#include <rtl.h>
OS_RESULT isr_mbx_receive (
OS_IDmailbox, /* The mailbox to put the message in */
void** message ); /* Location to store the message pointer */
Description
The isr_mbx_receive function gets a pointer to a message
from the mailbox if the mailbox is not empty. The function
puts the message pointer from the mailbox into the location pointed
by the message argument. The isr_mbx_receive function
does not cause the current task to sleep even if there is no message
in the mailbox. Hence this function can be called from an interrupt
function.
You can use the isr_mbx_receive function to receive a
message or a protocol frame (for example TCP-IP, UDP, and ISDN) in an
interrupt function.
The isr_mbx_receive 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.
You can call the isr_mbx_receive function only from IRQ
interrupt functions. You cannot call it from the FIQ interrupt
function.
When you get the message from the mailbox, you must free the
memory block containing the message to avoid running out of
memory.
When you get the message from the mailbox, space is created in
the mailbox for a new message.
Return Value
The isr_mbx_receive function returns the completion
value:
Return Value
Description
OS_R_MBX
A message was available and was read from the mailbox.
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.