#include <rtl.h>
OS_RESULT os_mbx_send (
OS_IDmailbox, /* The mailbox to put the message in */
void* message_ptr, /* Pointer to the message */
U16 timeout ); /* Wait time for mailbox to be free */
Description
The os_mbx_send function puts the pointer to a message,
message_ptr, in the mailbox, if the mailbox is not
already full.
If the mailbox is full, the RTX kernel puts the calling task to
sleep. The timeout specifies the length of time the task can
wait for a space to become available in the mailbox. The kernel wakes
up the task either when the timeout has expired or when a space
becomes available in the mailbox.
You can set the timeout to any value between 0 and 0xFFFE. You can
set the timeout to 0xFFFF for an indefinite timeout.
The os_mbx_send function is in the RL-RTX library. The
prototype is defined in rtl.h.
Note
You must declare and initialize the mailbox object before you
perform any operation on it.
The unit of measure of the timeout argument is numbers
of system intervals.
The message_ptr points to a block of allocated memory
holding a message of any type. The block of memory is allocated
when the message is created and freed by the destination task when
the message is received.
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers of your data.