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_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.