procedure Message_Queue_Broadcast ( ID : in RTEMS.ID; Buffer : in RTEMS.Address; Size : in RTEMS.Unsigned32; Count : out RTEMS.Unsigned32; Result : out RTEMS.Status_Codes );
RTEMS.SUCCESSFUL
- message broadcasted successfully
RTEMS.INVALID_ID
- invalid queue id
RTEMS.INVALID_SIZE
- invalid message size
This directive causes all tasks that are waiting at the queue specified by id to be unblocked and sent the message contained in buffer. Before a task is unblocked, the message buffer of size byes in length is copied to that task's message buffer. The number of tasks that were unblocked is returned in count.
The calling task will be preempted if it has preemption enabled and a higher priority task is unblocked as the result of this directive.
The execution time of this directive is directly
related to the number of tasks waiting on the message queue,
although it is more efficient than the equivalent number of
invocations of rtems.message_queue_send
.
Broadcasting a message to a global message queue which does not reside on the local node will generate a request telling the remote node to broadcast the message to the specified message queue.
When a task is unblocked which resides on a different node from the message queue, a copy of the message is forwarded to the appropriate node, the waiting task is unblocked, and the proxy used to represent the task is reclaimed.
Copyright © 1988-2004 OAR Corporation