beautypg.com

Renesas Emulator System M3T-MR100 User Manual

Page 153

background image

- 137 -

z

z

R

R

e

e

g

g

i

i

s

s

t

t

e

e

r

r

c

c

o

o

n

n

t

t

e

e

n

n

t

t

s

s

a

a

f

f

t

t

e

e

r

r

s

s

e

e

r

r

v

v

i

i

c

c

e

e

c

c

a

a

l

l

l

l

i

i

s

s

i

i

s

s

s

s

u

u

e

e

d

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

E

r

r

r

r

o

o

r

r

c

c

o

o

d

d

e

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

F

u

u

n

n

c

c

t

t

i

i

o

o

n

n

a

a

l

l

d

d

e

e

s

s

c

c

r

r

i

i

p

p

t

t

i

i

o

o

n

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 memory 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.