RTEMS ITRON 3.0 API User's Guide
ER ref_mpf( T_RMPF *pk_rmpf, ID mpfid );
E_OK
- Normal Completion
E_ID
- Invalid ID number (mpfid was invalid or could not be used)
E_NOEXS
- Object does not exist \(the memorypool specified by mpfid does
not exist.)
E_OACV
- Object access violation (A mpfid less than -4 was specified from
a user task. This is implementation dependent.)
E_PAR
- Parameter error (the packet address for the return parameters
could not be used)
This system call refers to the state of the fixed-size memorypool specified by mpfid, and returns the current number of free blocks (frbcnt), information of a task waiting to be allocated memory (wtsk), and its extended information (exinf). Wtsk indicates whether or not there is a task waiting to be allocated memory from the fixed-size memorypool specified. If there is no waiting task, wtsk is returned as FALSE = 0. If there is a waiting task, wtsk is returned as a value other than 0.
While the frsz return parameter of ref_mpl returns the total size of free memory, the frbcnt return parameter of ref_mpf returns the number of free blocks.
Depending on the implementation, additional information besides wtsk and frbcnt (such as memorypool attributes, mpfatr) may also be referred.
RTEMS ITRON 3.0 API User's Guide
Copyright © 1988-2008 OAR Corporation