- 137 -
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
get_mpf,pget_mpf,ipget_mpf
Register name Content after service call is issued
R0 Error code
R3R1 Start address of the acquired memory block
R2 ID number of the target fixed-size memory pool to be acquired
tget_mpf
Register name Content after service call is issued
R0 Error code
R3R1 Start address of the acquired memory block
R2 ID number of the target fixed-size memory pool to be acquired
R6R4 Timeout value
[
[[
[
E
Er
rr
ro
or
r
c
co
od
de
e
]
]]
]
E_RLWAI Forced release from waiting
E_TMOUT Polling failure or timeout or timed out
EV_RST Released from WAITING state by clearing of the memory pool area
[
[[
[
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 acquires a memory block from the fixed-size memory pool indicated by mpfid and stores the start address
of the acquired memory block in the variable p_blk. The content of the acquired me mory block is indeterminate.
If the fixed-size memory pool indicated by mpfid has no memory blocks in it and the used service call is tget_mpf or
get_mpf, the task that issued it goes to a memory block wait state and is enqueued in a memory block waiting queue. In that
case, if the attribute of the specified fixed-size memory pool is TA_TFIFO, the task is enqueued in order of FIFO; if
TA_TPRI, the task is enqueued in order of priority. If the issued service call was pget_mpf or ipget_mpf, the task returns
immediately and responds to the call with the error code E_TMOUT.
For the tget_mpf service call, specify a wait time for tmout in ms units. The values specified for tmout must be within
(0x7FFFFFFF – time tick value). If any value exceeding this limit is specified, the service call may not operate correctly. If
TMO_POL=0 is specified for tmout, it means specifying 0 as a timeout value, in which case the service call operates the
same way as pget_mpf. Furthermore, if specified as tmout=TMO_FEVR(–1), it means specifying an infinite wait, in which
case the service call operates the same way as get_mpf.
The task placed into WAITING state by execution of the get_mpf or tget_mpf service call is released from WAITING state
in the following cases:
When the rel_mpf or irel_mpf service call is issued before the tmout time elapses, with
task-awaking conditions thereby satisfied
The error code returned in this case is E_OK.
When the first time tick occurred after tmout elapsed while task-awaking conditions remain un-
satisfied
The error code returned in this case is E_TMOUT.
When the task is forcibly released from WAITING state by the rel_wai or irel_wai service call is-
sued from another task or a handler
The error code returned in this case is E_RLWAI.
When the target memory pool being waited for is initialized by the vrst_mpf service call issued
from another task
The error code returned in this case is EV_RST.
If this service call is to be issued from task context, use get_mpf,pget_mpf,tget_mpf; if issued from non-task context, use
ipget_mpf.