Everything

ref_mpl

iref_mpl

Outline
Reference variable-sized memory pool state.
C format
 ER      ref_mpl (ID mplid, T_RMPL *pk_rmpl);
 ER      iref_mpl (ID mplid, T_RMPL *pk_rmpl);
Parameter(s)
I/O
Parameter
Description
I
 ID      mplid;
ID number of the variable-sized memory pool.
O
 T_RMPL  *pk_rmpl;
Pointer to the packet returning the variable-sized memory pool state.

[Variable-sized memory pool state packet: T_RMPL]
 typedef struct  t_rmpl {
     ID      wtskid;         /*Existence of waiting task*/
     SIZE    fmplsz;         /*Total size of free memory blocks*/
     UINT    fblksz;         /*Maximum memory block size available*/
 } T_RMPL;

Explanation
These service calls store the detailed information (ID number of the task at the head of the wait queue, total size of free memory blocks, etc.) of the variable-size memory pool specified by parameter mplid into the area specified by parameter pk_rmpl.
- wtskid
Stores whether a task is queued to the variable-size memory pool wait queue.
TSK_NONE: No applicable task
Value: ID number of the task at the head of the wait queue
- fmplsz
Stores the total size of free memory blocks (in bytes).
- fblksz
Stores the maximum memory block size available (in bytes).
Return value
Macro
Value
Description
E_OK
0
Normal completion.
E_PAR
-17
Parameter error.
- pk_rmpl == NULL
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 in the status "PSW.IPL > kernel interrupt mask level".
Note When the iref_mpl is issued from task or the ref_mpl is issued from non-task, the context error is not detected and normal operation of the system is not guaranteed.
E_MACV
-26
Memory access violation. (only for ref_mpl)
- The operand-write access to the area indicated by pk_rmpl has not been permitted to the invoking task.
E_NOEXS
-42
Non-existent object.
- The variable-sized memory pool specified by mplid does not exist.