<< Previous | Next >> | |
|
OS_EVENT * OSQDel( OS_EVENT * pevent, INT8U opt, INT8U * err );
Description
- Deletes a message queue and readies all tasks pending on the queue. Note that:
This function must be used with care. Tasks that would normally expect the presence of the queue MUST check the return code of
OSQPend()
.
OSQAccept()
callers will not know that the intended queue has been deleted unless they checkpevent
to see that it's a null pointer.This call can potentially disable interrupts for a long time. The interrupt disable time is directly proportional to the number of tasks waiting on the queue.
Because all tasks pending on the queue will be readied, you must be careful in applications where the queue is used for mutual exclusion because the resource(s) will no longer be guarded by the queue.
If the storage for the message queue was allocated dynamically (i.e., using a
malloc()
type call) then your application must release the memory storage by call the counterpart call of the dynamic allocation scheme used. If the queue storage was created statically then, the storage can be reused.Parameters
Return value
- pevent
- Error
- (OS_EVENT *)0
- The queue was successfully deleted.
Library
- OS_Q.C (Prior to DC 8:UCOS2.LIB)
Dynamic C Functions | << Previous | Next >> | rabbit.com |