RTEMS Logo

RTEMS 4.6.1 On-Line Library


Semaphore Manager Theory

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

3.2.1: Theory

Semaphores are used for synchronization and mutual exclusion by indicating the availability and number of resources. The task (the task which is returning resources) notifying other tasks of an event increases the number of resources held by the semaphore by one. The task (the task which will obtain resources) waiting for the event decreases the number of resources held by the semaphore by one. If the number of resources held by a semaphore is insufficient (namely 0), the task requiring resources will wait until the next time resources are returned to the semaphore. If there is more than one task waiting for a semaphore, the tasks will be placed in the queue.


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

Copyright © 1988-2004 OAR Corporation