The rtems_message_queue_receive
directive attempts to
retrieve a message from the specified message queue. If at
least one message is in the queue, then the message is removed
from the queue, copied to the caller's message buffer, and
returned immediately along with the length of the message. When
messages are unavailable, one of the following situations
applies:
RTEMS_NO_WAIT
option forces an immediate return
with an error status code.
If the task waits for a message, then it is placed in the message queue's task wait queue in either FIFO or task priority order. All tasks waiting on a message queue are returned an error code when the message queue is deleted.
Copyright © 1988-2008 OAR Corporation