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 to be referenced.
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*/
     ATR     mplatr;         /*Attribute*/
     ID      memid;          /*Reserved for future use*/
 } 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.
Note For details about the variable-sized memory pool state packet, refer to "15.2.10 Variable-sized memory pool state packet".
Return value
Macro
Value
Description
E_OK
0
Normal completion.
E_ID
-18
Invalid ID number.
- mplid < 0x0
- mplid > 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 variable-sized memory pool is not registered.