OAR

RTEMS 4.5.0 On-Line Library


Semaphore Manager Releasing a Semaphore

PREV UP NEXT Bookshelf RTEMS Ada User's Guide

9.3.4: Releasing a Semaphore

The rtems.semaphore_release directive is used to release the specified semaphore. A simplified version of the rtems.semaphore_release directive can be described as follows:

if no tasks are waiting on this semaphore
   then increment semaphore's count
   else assign semaphore to a waiting task

return SUCCESSFUL

If this is the outermost release of a binary semaphore that uses priority inheritance or priority ceiling and the task does not currently hold any other binary semaphores, then the task performing the rtems.semaphore_release will have its priority restored to its normal value.


PREV UP NEXT Bookshelf RTEMS Ada User's Guide

Copyright © 1988-2000 OAR Corporation