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.
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.
Return value
Macro
Value
Description
E_OK
0
Normal completion.
E_PAR
-17
Parameter error.
- blk == NULL
- blk is illegal.
E_ID
-18
Invalid ID number.
- mpfid < 0
- mpfid > VTMAX_MPF
E_CTX
-25
Context error.
- This service call was issued in the CPU locked state.
- The irel_mpf was issued from task.
- The rel_mpf was issued from non-task.
- This service call was issued in the status "PSW.IPL > kernel interrupt mask level".
E_MACV
-26
Memory access violation. (only for rel_mpf)
- Stack pointer points out of user stack for invoking task.
E_NOEXS
-42
Non-existent object.
- The fixed-sized memory pool specified by mpfid does not exist.