RTEMS Logo

RTEMS 4.7.1 On-Line Library


Semaphore Manager Building a SEMAPHORE_OBTAIN Option Set

PREV UP NEXT Bookshelf RTEMS C User's Guide

9.2.6: Building a SEMAPHORE_OBTAIN Option Set

In general, an option is built by a bitwise OR of the desired option components. The set of valid options for the rtems_semaphore_obtain directive are listed in the following table:

Option values are specifically designed to be mutually exclusive, therefore bitwise OR and addition operations are equivalent as long as each attribute appears exactly once in the component list. An option listed as a default is not required to appear in the list, although it is a good programming practice to specify default options. If all defaults are desired, the option RTEMS_DEFAULT_OPTIONS should be specified on this call.

This example demonstrates the option parameter needed to poll for a semaphore. The option parameter passed to the rtems_semaphore_obtain directive should be RTEMS_NO_WAIT.


PREV UP NEXT Bookshelf RTEMS C User's Guide

Copyright © 1988-2004 OAR Corporation