RTEMS Logo

RTEMS 4.7.0 On-Line Library


Memory Pool Manager rel_blk - Release Variable-Size Memory Block

PREV UP NEXT Bookshelf RTEMS ITRON 3.0 API User's Guide

9.4.6: rel_blk - Release Variable-Size Memory Block

CALLING SEQUENCE:

ER rel_blk(
  ID mplid,
  VP blk
);

STATUS CODES:

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 (blk is invalid or an attempt was made to return the memory block to the wrong memorypool)

DESCRIPTION:

This system call releases the memory block specified by blk and returns it to the variable-size memorypool specified by mplid. Executing rel_blk allows memory to be allocated to the next task waiting for memory allocation from the memorypool given by mplid, thus releasing that task from its WAIT state. The variable-size memorypool to which the memory block is returned must be the same memorypool from which it was originally allocated. An E_PAR error will result if an attempt is made to return a memory block to another memorypool than that from which it was originally allocated.

NOTES:

When memory is returned to a variable-size memorypool for which more than one task is waiting, multiple tasks may be released from waiting at the same time depending on the number of bytes of memory. The order of tasks on the ready queue among tasks having the same priority after being released from waiting for memory is implementation dependent.


PREV UP NEXT Bookshelf RTEMS ITRON 3.0 API User's Guide

Copyright © 1988-2004 OAR Corporation