- 133 -
ref_mbx Reference mailbox status iref_mbx Reference mailbox status (handler only)
[
[[
[
C
C
L
La
an
ng
gu
ua
ag
ge
e
A
AP
PI
I
]
]]
]
ER ercd = ref_mbx( ID mbxid, T_RMBX *pk_rmbx );
ER ercd = iref_mbx( ID mbxid, T_RMBX *pk_rmbx );
z
z
P
Pa
ar
ra
am
me
et
te
er
rs
s
ID mbxid ID number of the target mailbox
T_RMBX *pk_rmbx Pointer to the packet to which mailbox status is returned
z
z
R
Re
et
tu
ur
rn
n
P
Pa
ar
ra
am
me
et
te
er
rs
s
ER ercd Terminated normally (E_OK)
T_RMBX *pk_rmbx Pointer to the packet to which mailbox status is returned
Contents of pk_rmbx
typedef struct t_rmbx{
ID wtskid +0 2 Reception waiting task ID
T_MSG *pk_msg +4 4 Next message packet to be received
} T_RMBX;
[
[[
[
A
As
ss
se
em
mb
bl
ly
y
l
la
an
ng
gu
ua
ag
ge
e
A
AP
PI
I
]
]]
]
.include mr100.inc
ref_mbx MBXID, PK_RMBX
iref_mbx MBXID, PK_RMBX
z
z
P
Pa
ar
ra
am
me
et
te
er
rs
s
MBXID ID number of the target mailbox
PK_RMBX Pointer to the packet to which mailbox status is returned
z
z
R
Re
eg
gi
is
st
te
er
r
c
co
on
nt
te
en
nt
ts
s
a
af
ft
te
er
r
s
se
er
rv
vi
ic
ce
e
c
ca
al
ll
l
i
is
s
i
is
ss
su
ue
ed
d
Register name Content after service call is issued
R0 Error code
R2 ID number of the target mailbox
A1 Pointer to the packet to which mailbox status is returned
[
[[
[
E
Er
rr
ro
or
r
c
co
od
de
e
]
]]
]
None
[
[[
[
F
Fu
un
nc
ct
ti
io
on
na
al
l
d
de
es
sc
cr
ri
ip
pt
ti
io
on
n
]
]]
]
This service call returns various statuses of the mailbox indicated by mbxid.
wtskid
Returned to wtskid is the ID number of the task at the top of a reception waiting queue (the next task to be de-
queued). If no tasks are kept waiting, TSK_NONE is returned.
*pk_msg
Returned to *pk_msg is the start address of the next message to be received. If there are no messages to be re-
ceived next, NULL is returned. T_MSG* should be specified with a 32-bit address.
If this service call is to be issued from task context, use ref_mbx; if issued from non-task context, use iref_mbx.