RTEMS ITRON 3.0 API User's Guide
ER ref_mpl( T_RMPL *pk_rmpl, ID mplid );
E_OK
- Normal Completion
E_ID
- Invalid ID number (mplid was invalid or could not be used)
E_NOEXS
- Object does not exist (the memorypool specified by mplid does not exist)
E_OACV
- Object access violation (A mplid less than -4 was specified from
a user task. This is implementation dependent.) Note: User tasks can issue ref_mpl in order to reference memorypools of mplid = TMPL_OS = -4. Whether or not memorypools of mplid = -3 or -2 may be specified to ref_mpl by user tasks 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 variable-size memorypool specified by mplid, and returns the total free memory size currently available (frsz), the maximum continuous memory size of readily available free memory (maxsz), 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 variable-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.
In some implementations, memorypools having mplid = -3 or -2 may be referred with ref_mpl as memorypools used by implementation-dependent parts of the OS (such as those used for the stack only). This system call can provide more detailed information regarding remaining memory if the usage of memorypools having mplid = -3 or -2 is more clearly defined. Whether or not this feature is used and any details regarding information provided are implementation dependent.
RTEMS ITRON 3.0 API User's Guide
Copyright © 1988-2007OAR Corporation