Everything

ref_mpf

iref_mpf

Outline
Reference fixed-sized memory pool state.
C format
 ER      ref_mpf (ID mpfid, T_RMPF *pk_rmpf);
 ER      iref_mpf (ID mpfid, T_RMPF *pk_rmpf);
Parameter(s)
I/O
Parameter
Description
I
 ID      mpfid;
ID number of the fixed-sized memory pool to be referenced.
O
 T_RMPF  *pk_rmpf;
Pointer to the packet returning the fixed-sized memory pool state.

[Fixed-sized memory pool state packet: T_RMPF]
 typedef struct  t_rmpf {
     ID      wtskid;         /*Existence of waiting task*/
     UINT    fblkcnt;        /*Number of free memory blocks*/
     ATR     mpfatr;         /*Attribute*/
     ID      memid;          /*Reserved for future use*/
 } T_RMPF;

Explanation
Stores fixed-sized memory pool state packet (ID number of the task at the head of the wait queue, number of free memory blocks, etc.) of the fixed-sized memory pool specified by parameter mpfid in the area specified by parameter pk_rmpf.
Note For details about the fixed-sized memory pool state packet, refer to "15.2.9 Fixed-sized memory pool state packet".
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.