Everything

rel_mpl

Outline
Release variable-sized memory block.
C format
 ER      rel_mpl (ID mplid, VP blk);
Parameter(s)
I/O
Parameter
Description
I
 ID      mplid;
ID number of the variable-sized memory pool.
I
 VP      blk;
Start address of memory block to be released.

Explanation
This service call returns the variable-sized memory block specified by parameter blk to the variable-sized memory pool specified by parameter mplid.
After returning the variable-size memory blocks, these service calls check the tasks queued to the target variable-size memory pool wait queue from the top, and assigns the memory if the size of memory requested by the wait queue is available. This operation continues until no tasks queued to the wait queue remain or no memory space is available. As a result, the task that acquired the memory is unlinked from the queue and moved from the WAITING state (variable-size memory block acquisition wait state) to the READY state, or from the WAITING-SUSPENDED state to the SUSPENDED state.
Note The RI600PX do only simple error detection for blk. If blk is illegal and the error is not detected, the operation is not guaranteed after that.
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.
- mplid < 0
- mplid > VTMAX_MPL
E_CTX
-25
Context error.
- This service call was issued in the CPU locked state.
- This service call 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.
- Stack pointer points out of user stack for invoking task.
E_NOEXS
-42
Non-existent object.
- The variable-sized memory pool specified by mplid does not exist.