RTEMS Logo

RTEMS 4.9.2 On-Line Library


Barrier Manager Waiting at a Barrier

PREV UP NEXT Bookshelf RTEMS C User's Guide

20.3.3: Waiting at a Barrier

The rtems_barrier_wait directive is used to wait at the specified barrier. Since a barrier is, by definition, never immediately, the task may wait forever for the barrier to be released or it may specify a timeout. Specifying a timeout limits the interval the task will wait before returning with an error status code.

If the barrier is configured as automatic and there are already one less then the maximum number of waiters, then the call will unblock all tasks waiting at the barrier and the caller will return immediately.

When the task does wait to acquire the barrier, then it is placed in the barrier's task wait queue in FIFO order. All tasks waiting on a barrier are returned an error code when the barrier is deleted.


PREV UP NEXT Bookshelf RTEMS C User's Guide

Copyright © 1988-2008 OAR Corporation