vrst_mpl

Outline

Reset variable-sized memory pool.

C format

 ER      vrst_mpl (ID mplid);
Parameter(s)

I/O

Parameter

Description

I

 ID      mplid;
ID number of the variable-sized memory pool.



Explanation

This service call reset the variable-sized memory pool specified by parameter mplid.

The tasks to wait to get memory block from the target variable-sized memory pool are released from the WAITING state, and EV_RST is returned as a return value for the tasks.

Note 1 All variable-sized memory blocks that had already been acquired are returned to the target variable-sized memory pool. Therefore, do not access those variable-sized memory blocks after issuing this service call.

Note 2 This service call is the function outside mITRON4.0 specification.

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 from a non-task.

- This service call was issued in the CPU locked state.

- 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 fixed-sized memory pool specified by mpfid does not exist.