<< Previous | Next >>

OSMboxAccept

void *OSMboxAccept (OS_EVENT *pevent);

Description

Checks the mailbox to see if a message is available. Unlike OSMboxPend(), OSMboxAccept() does not suspend the calling task if a message is not available.

Parameters

pevent
Pointer to the mailbox's event control block.

Return value

!= (void *)0
This is the message in the mailbox if one is available. The mailbox is cleared so the next time OSMboxAccept() is called, the mailbox will be empty.

== (void *)0
The mailbox is empty, or pevent is a NULL pointer, or you didn't pass the proper event pointer.

Library

OS_MBOX.C

See also

OSMboxCreate, OSMboxPend, OSMboxPost, OSMboxQuery


020-0059 Rev. D << Previous | Next >> µC/OS-II