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.
|