RTEMS ITRON 3.0 API User's Guide
ER cre_mpl( ID mplid, T_CMPL *pk_cmpl );
E_OK
- Normal Completion
E_NOMEM
- Insufficient memory (Memory for control block and/or for
memorypool cannot be allocated)
E_ID
- Invalid ID number (mplid was invalid or could not be used)
E_RSATR
- Reserved attribute (mplatr was invalid or could not be used)
E_OBJ
- Invalid object state (a memorypool of the same ID already exists)
E_OACV
- Object access violation (A mplid less than -4 was specified from
a user task. This is implementation dependent.)
E_PAR
- Parameter error (pk_cmpl is invalid or mplsz is negative or
invalid)
The cre_mpl directive creates a variable-size memorypool having the ID number specified by mplid. Specifically, a memory area of the size determined by mplsz is allocated for use as a memorypool. A control block for the memorypool being created is also allocated. User memorypools have positive ID numbers, while system memorypools have negative ID numbers. User tasks (tasks having positive task IDs) cannot access system memorypools (memorypools having negative ID numbers).
The memory required for creating memorypools and for allocating control blocks for each object is reserved while system initialization. Associated parameters are therefore specified at system configuration.
RTEMS ITRON 3.0 API User's Guide
Copyright © 1988-2007OAR Corporation