-
rel_mpf
-
Release fixed-sized memory block.
ER rel_mpf ( ID mpfid, VP blk );
|
MOVW BC, #LOWW(_blk)
MOV A, #mpfid
CALL !!_rel_mpf
|
|
|
|
|
ID mpfid;
|
ID number of the fixed-sized memory pool to which the memory block is released.
|
|
VP blk;
|
Start address of the memory block to be released.
|
This service call returns the memory block specified by parameter
blk to the fixed-sized memory pool specified by parameter
mpfid.
If a task is queued to the target fixed-sized memory pool wait queue when this service call is issued, memory block return processing is not performed but memory blocks are returned to the relevant task (first task of wait queue).
As a result, the relevant task is unlinked from the wait queue and is moved from the WAITING state (waiting state for a fixed-sized memory block) to the READY state, or from the WAITING-SUSPENDED state to the SUSPENDED state.
Note 1 If the first task of the wait queue is moved to the READY state after this service call is issued, this service call also re-queues the task at the end of the ready queue corresponding to the priority of the task.
Note 2 The RI78V4 does not clear the memory blocks before returning them. The contents of the returned memory blocks are therefore undefined.