<< 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. A null pointer must not be sent.
- opt
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
pevent
is a null pointer.
- OS_ERR_POST_NULL_PTR
- Attempting to post a null pointer.
Library
- OS_Q.C (Prior to DC 8:UCOS2.LIB)
Dynamic C Functions | << Previous | Next >> | rabbit.com |