RTEMS ITRON 3.0 API User's Guide
ER ercd =pget_blk( VP *p_blk, ID mplid, INT blksz );
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.)
E_PAR
- Parameter error (tmout is -2 or less, blksz is negative or invalid)
E_DLT
- The object being waited for was deleted (the specified memorypool
was deleted while waiting)
E_RLWAI
- WAIT state was forcibly released (rel_wai was received while
waiting)
E_TMOUT
- Polling failure or timeout
E_CTX
- Context error (issued from task-independent portions or a
task in dispatch disabled state; implementation dependent for
pget_blk and tget_blk(tmout=TMO_POL))
The pget_blk system call has the same function as get_blk except for the waiting feature. Pget_blk polls whether or not the task should wait if get_blk is executed. The meaning of parameters to pget_blk are the same with get_blk. The specific operations by pget_blk are as follows.
- If there is enough free memory to get the memory block of specified size immediately, processing is the same as get_blk: that is, the requested memory is allocated and the system call completes normally.
- If there is not enough free memory, an E_TMOUT error is returned to indicate polling failed and the system call finishes. Unlike get_blk, the issuing task does not wait in this case. Also, the issuing task does not get any memory.
NONE
RTEMS ITRON 3.0 API User's Guide
Copyright © 1988-2003 OAR Corporation