<< Previous | Next >> | |
|
OS_EVENT * OSMboxDel( OS_EVENT * pevent, INT8U opt, INT8U * err );
Description
- This function deletes a mailbox and readies all tasks pending on the mailbox. Note that:
This function must be used with care. Tasks that would normally expect the presence of the mailbox MUST check the return code of
OSMboxPend()
.
OSMboxAccept()
callers will not know that the intended mailbox 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 mailbox.
Because ALL tasks pending on the mailbox will be readied, you MUST be careful in applications where the mailbox is used for mutual exclusion because the resource(s) will no longer be guarded by the mailbox.
Parameters
Return Value
- != (void *)0
- Is a pointer to the event control clock (OS_EVENT) associated with the created mailbox
- == (void *)0
- If no event control blocks were available
Library
- OS_MBOX.C
Dynamic C Functions | << Previous | Next >> | rabbit.com |