- 141 -
ref_mpf Reference fixed-size memory pool status iref_mpf Reference fixed-size memory pool status (handler only)
[
[[
[
C
C
L
La
an
ng
gu
ua
ag
ge
e
A
AP
PI
I
]
]]
]
ER ercd = ref_mpf( ID mpfid, T_RMPF *pk_rmpf );
ER ercd = iref_mpf( ID mpfid, T_RMPF *pk_rmpf );
z
z
P
Pa
ar
ra
am
me
et
te
er
rs
s
ID mpfid Task ID waiting for memory block to be acquired
T_RMPF *pk_rmpf Pointer to the packet to which fixed-size memory pool 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_RMPF *pk_rmpf Pointer to the packet to which fixed-size memory pool status is returned
Contents of pk_rmpf
typedef struct t_rmpf{
ID wtskid +0 2 Task ID waiting for memory block to be acquired
UINT fblkcnt +2 4 Number of free memory blocks
} T_RMPF;
[
[[
[
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_mpf MPFID,PK_RMPF
iref_mpf MPFID,PK_RMPF
z
z
P
Pa
ar
ra
am
me
et
te
er
rs
s
MPFID Task ID waiting for memory block to be acquired
PK_RMPF Pointer to the packet to which fixed-size memory pool 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 Task ID waiting for memory block to be acquired
A1 Pointer to the packet to which fixed-size memory pool 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 message buffer indicated by mpfid.
wtskid
Returned to wtskid is the ID number of the task at the top of a memory block waiting queue (the first queued
task). If no tasks are kept waiting, TSK_NONE is returned.
fblkcnt
The number of free memory blocks in the specified memory pool is returned.
If this service call is to be issued from task context, use rel_mpf; if issued from non-task context, use irel_mpf.