trcv_mbx
MOVW AX, #tmout_hi PUSH AX MOVW AX, #tmout_lo PUSH AX MOVW BC, #LOWW(_ppk_msg) MOV A, #mbxid CALL !!_trcv_mbx ADDW SP, #0x0004 |
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 the message could not be received from the target mailbox (no messages were queued in the wait queue) when this service call is issued, message reception processing is not executed but the invoking task is queued to the target mailbox wait queue in the order of message reception request (FIFO order).
As a result, the invoking task is unlinked from the ready queue and is moved from the RUNNING state to the WAITING state (receiving waiting state for a mailbox).
The receiving waiting state for a mailbox is cancelled in the following cases, and then moved to the READY state.