-
rcv_mbx
-
Receive from mailbox (waiting forever).
ER rcv_mbx (ID mbxid, T_MSG **ppk_msg);
|
|
|
|
ID mbxid;
|
ID number of the mailbox.
|
|
T_MSG **ppk_msg;
|
Start address of the message packet received from the mailbox.
|
[Message packet T_MSG for TA_MFIFO attribute ]
typedef struct {
VP msghead; /*RI600PX management area*/
} T_MSG;
|
[Message packet T_MSG_PRI for TA_MPRI attribute]
typedef struct {
T_MSG msgque; /*Message header*/
PRI msgpri; /*Message priority*/
} T_MSG_PRI;
|
This service call receives a message from the mailbox specified by parameter
mbxid, and stores its start address in the area specified by parameter
ppk_msg.
If no message could be received from the target mailbox (no messages were queued to the wait queue) when this service call is issued, this service call does not receive messages but queues the invoking task to the target mailbox wait queue and moves it from the RUNNING state to the WAITING state (message reception wait state).
The receiving WAITING state for a mailbox is cancelled in the following cases.
Receiving WAITING State for a Mailbox Cancel Operation
|
|
A message was transmitted to the target mailbox as a result of issuing snd_mbx.
|
|
A message was transmitted to the target mailbox as a result of issuing isnd_mbx.
|
|
Forced release from waiting (accept rel_wai while waiting).
|
|
Forced release from waiting (accept irel_wai while waiting).
|
|
Forced release from waiting (accept del_mbx while waiting).
|
|
Note Invoking tasks are queued to the target mailbox wait queue in the order specified at creating the mailbox (FIFO order or current priority order).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- This service call was issued from a non-task.
- This service call was issued in the CPU locked state.
- This service call was issued in the dispatching disabled state.
- This service call was issued in the status "PSW.IPL > kernel interrupt mask level".
|
|
|
- Stack pointer points out of user stack for invoking task.
- The operand-write access to the area indicated by ppk_msg has not been permitted to the invoking task.
|
|
|
- The mailbox specified by mbxid does not exist.
|
|
|
Forced release from the WAITING state.
|
|
|
|