snd_mbx
SUBW SP, #0x06 MOVW [SP+0x02], AX MOVW AX, BC MOVW [SP+0x04], AX MOVW AX, SP MOVW BC, AX MOV A, #mbxid CALL !!_snd_mbx |
This service call transmits the message specified by parameter pk_msg to the mailbox specified by parameter mbxid (queues the message in the wait queue).
If a task is queued to the target mailbox wait queue when this service call is issued, the message is not queued but handed over to the relevant task (first task of the wait queue).
As a result, the relevant task is unlinked from the wait queue and is moved from the WAITING state (receiving waiting for a mailbox) to the READY state, or from the WAITING-SUSPENDED state to the SUSPENDED state.
Note 1 If the first task of the wait queue is moved to the READY state after this service call is issued, this service call also re-queues the task at the end of the ready queue corresponding to the priority of the task.
Note 2 Messages are queued to the target mailbox wait queue in the order defined by Attribute (queuing method): mbxatr during configuration (FIFO order or priority order).