
2. PMC SYSTEM CALL
B–61863E–1/06
PMC LIBRARY
166
SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A
f f f f
[Name]
os_red2_mbx
[Description]
Reads eight bytes of the message entry from the mailbox.
[Format]
ret = os_red2_mbx(mailbox_id,wait_limit,
read_message_lo,read_message_hi) ;
unsigned short ret ;
unsigned char mailbox_id ;
long wait_limit ;
unsigned long *read_message_lo ;
unsigned long *read_message_hi ;
[Input]
mailbox_id Mailbox ID (10 to 39)
wait_limit If the mailbox is empty:
S For a positive value, the limit time waiting state is set
(one count: eight milliseconds).
S For 0, no limit time waiting state is set.
S For a negative value, the permanent waiting state is
set.
[Output]
read_message_lo
read_message_hi
[Returns]
ret Completion code
0 ; The message has been read normally from the mailbox.
0108H ; The mailbox ID is out of range (other than 10 to 39).
0114H ; There is no specified mailbox ID.
0118H ; The specified mailbox ID was deleted.
011AH ; The specified limit time has elapsed (for wait_limit > 0).
[Remarks]
If the mailbox is empty, the task enters the wait state.
2.24
READING THE
EIGHT-BYTE
MESSAGE FROM
THE MAILBOX