Chapter 3 Introduction to MR308
- 43 -
T_MSG
header
T_MSG
header
T_MSG
header
Message
queue
Message A Message B Message C
Figure 3.34 Message queue
There are following data queue service calls that are provided by the MR308 kernel.
• Send to Mailbox (snd_mbx, isnd_mbx)
Transmits a message. Namely, a message is dropped into the mailbox.
• Receive from Mailbox (rcv_mbx, trcv_mbx)
Receives a message. Namely, a message is retrieved from the mailbox. At this time, if the mailbox has
no messages in it, the task is kept waiting until a message is sent to the mailbox.
• Receive from Mailbox (polling) (prcv_mbx, iprcv_mbx)
Receives a message. The difference from the rcv_mbx service call is that if the mailbox has no mes-
sages in it, the task returns error code without going to a wait state.
• Reference Mailbox Status (ref_mbx, iref_mbx)
Checks to see if there are any tasks waiting for a message to be put into the target mailbox and refers
to the message present at the top of the mailbox.