|
| << Previous | Next >> |
INT8U OSQPostOpt (OS_EVENT *pevent, void *msg, INT8U opt);
Description
- This function sends a message to a queue. This call has been added to reduce code size since it can replace both
OSQPost()andOSQPostFront(). Also, this function adds the capability to broadcast a message to all tasks waiting on the message queue.
NOTE Interrupts can be disabled for a long time if you do a "broadcast." In fact, the interrupt disable time is proportional to the number of tasks waiting on the queue. Parameters
- pevent
- Pointer to message queue's event control block.
- msg
- Pointer to the message to send.
NULLpointer must not be sent.
- opt
- Determines the type of POST performed:
Return value
- OS_NO_ERR
- The call was successful and the message was sent.
- OS_Q_FULL
- The queue is full, cannot accept any more messages.
- OS_ERR_EVENT_TYPE
- A pointer to a queue was not passed.
- OS_ERR_PEVENT_NULL
- If
peventis aNULLpointer.
- OS_ERR_POST_NULL_PTR
- Attempting to post a
NULLpointer.
Library
- OS_Q.C
| 020-0059 Rev. D | << Previous | Next >> | µC/OS-II |