Everything

rel_mpf

irel_mpf

Outline
Release fixed-sized memory block.
C format
 ER      rel_mpf (ID mpfid, VP blk);
 ER      irel_mpf (ID mpfid, VP blk);
Parameter(s)
I/O
Parameter
Description
I
 ID      mpfid;
ID number of the fixed-sized memory pool to which the memory block is released.
I
 VP      blk;
Start address of the memory block to be released.

Explanation
This service call returns the fixed-sized 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, fixed-sized memory block return processing is not performed but fixed-sized 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 The RI850V4 does not perform memory clear processing when returning the acquired fixed-size memory block. The contents of the returned fixed-size memory block are therefore undefined.
Note 2 When returning fixed-size memory blocks, be sure to issue either of these service calls for the acquired fixed-size memory pools. If the service call is issued for another fixed-size memory pool, no error results but the operation is not guaranteed after that.
Return value
Macro
Value
Description
E_OK
0
Normal completion.
E_ID
-18
Invalid ID number.
- mpfid < 0x0
- mpfid > Maximum ID number
E_CTX
-25
Context error.
- This service call was issued in the CPU locked state.
E_NOEXS
-42
Non-existent object.
- Specified fixed-sized memory pool is not registered.