RTEMS Logo

RTEMS 4.9.2 On-Line Library


Message Manager MESSAGE_QUEUE_SEND - Put message at rear of a queue

PREV UP NEXT Bookshelf RTEMS Ada User's Guide

10.4.4: MESSAGE_QUEUE_SEND - Put message at rear of a queue

CALLING SEQUENCE:

procedure Message_Queue_Send (
   ID     : in     RTEMS.ID;
   Buffer : in     RTEMS.Address;
   Size   : in     RTEMS.Unsigned32;
   Result :    out RTEMS.Status_Codes
);

DIRECTIVE STATUS CODES:

RTEMS.SUCCESSFUL - message sent successfully
RTEMS.INVALID_ID - invalid queue id
RTEMS.INVALID_SIZE - invalid message size
RTEMS.INVALID_ADDRESS - buffer is NULL
RTEMS.UNSATISFIED - out of message buffers
RTEMS.TOO_MANY - queue's limit has been reached

DESCRIPTION:

This directive sends the message buffer of size bytes in length to the queue specified by id. If a task is waiting at the queue, then the message is copied to the waiting task's buffer and the task is unblocked. If no tasks are waiting at the queue, then the message is copied to a message buffer which is obtained from this message queue's message buffer pool. The message buffer is then placed at the rear of the queue.

NOTES:

The calling task will be preempted if it has preemption enabled and a higher priority task is unblocked as the result of this directive.

Sending a message to a global message queue which does not reside on the local node will generate a request to the remote node to post the message on the specified message queue.

If the task to be unblocked resides on a different node from the message queue, then the message is forwarded to the appropriate node, the waiting task is unblocked, and the proxy used to represent the task is reclaimed.


PREV UP NEXT Bookshelf RTEMS Ada User's Guide

Copyright © 1988-2008 OAR Corporation