RTEMS ITRON 3.0 API User's Guide
ER cre_mpf( ID mpfid, T_CMPF *pk_cmpf );
E_OK
- Normal Completion
E_NOMEM
- Insufficient memory (Memory for control block and/or for
memorypool cannot be allocated)
E_ID
- Invalid ID number (mpfid was invalid or could not be used)
E_RSATR
- Reserved attribute (mpfatr 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 mpfid less than -4 was specified from
a user task. This is implementation dependent.)
E_PAR
- Parameter error (pk_cmpf is invalid or mpfsz and/or blfsz is
negative or invalid)
This system call creates a fixed-size memorypool having the ID number specified by mpfid. Specifically, a memory area of a size based on values of mpfcnt and blfsz is reserved for use as a memorypool. A control block for the memorypool being created is also allocated. The get_blf system call specifying the memorypool created by this call can be issued to allocate memory blocks of the size given by blfsz (in bytes).
The memory area required for creating memorypools and for allocating control blocks for each object is allocated while system initialization. Associated parameters are therefore specified at system configuration.
RTEMS ITRON 3.0 API User's Guide
Copyright © 1988-2007OAR Corporation