|
| << Previous | Next >> |
void *OSMboxPend(OS_EVENT *pevent, INT16U timeout, INT8U *err);
Description
- Waits for a message to be sent to a mailbox.
Parameters
- pevent
- Pointer to mailbox's event control block.
- timeout
- Allows task to resume execution if a message was not received by the number of clock ticks specified. Specifying 0 means the task is willing to wait forever.
- err
- Pointer to a variable for holding an error code. Possible error messages are:
OS_NO_ERR: The call was successful and the task received a message.OS_TIMEOUT: A message was not received within the specified timeoutOS_ERR_EVENT_TYPE: Invalid event typeOS_ERR_PEND_ISRIf this function was called from an ISR and the result would lead to a suspension.OS_ERR_PEVENT_NULL: If pevent is aNULLpointerReturn value
- != (void *)0
- A pointer to the message received
- == (void *)0
- No message was received, or
peventis aNULLpointer, or the proper pointer to the event control block was not passed.
Library
- OS_MBOX.C
See also
- OSMboxAccept, OSMboxCreate, OSMboxPost, OSMboxQuery
| 020-0059 Rev. D | << Previous | Next >> | µC/OS-II |