RTEMS 6.1-rc6
|
This group contains the Barrier Handler implementation. More...
Files | |
file | corebarrier.h |
This header file provides interfaces of the Barrier Handler which are used by the implementation and the Application Configuration. | |
file | corebarrierimpl.h |
This header file provides interfaces of the Barrier Handler which are only used by the implementation. | |
file | corebarrier.c |
This source file contains the implementation of _CORE_barrier_Initialize(). | |
file | corebarrierwait.c |
This source file contains the implementation of _CORE_barrier_Seize(). | |
Data Structures | |
struct | CORE_barrier_Control |
This control block is used to manage a barrier. More... | |
Macros | |
#define | CORE_BARRIER_MANUAL_RELEASE_MAXIMUM_COUNT 0 |
This maximum thread count constant indicates that the barrier is a manual release barrier. | |
Functions | |
void | _CORE_barrier_Initialize (CORE_barrier_Control *the_barrier, uint32_t maximum_count) |
Initializes the core barrier. | |
Status_Control | _CORE_barrier_Seize (CORE_barrier_Control *the_barrier, Thread_Control *executing, bool wait, Thread_queue_Context *queue_context) |
Waits for the barrier. | |
Variables | |
const Thread_queue_Operations | _CORE_barrier_Thread_queue_operations |
These thread queue operations are used for core barriers. | |
This group contains the Barrier Handler implementation.
This handler encapsulates functionality which provides the foundation Barrier services used in all of the APIs supported by RTEMS.
void _CORE_barrier_Initialize | ( | CORE_barrier_Control * | the_barrier, |
uint32_t | maximum_count | ||
) |
Initializes the core barrier.
[out] | the_barrier | is the barrier to initialize. |
maximum_count | is the number of threads which must arrive at the barrier to trip the automatic release or CORE_BARRIER_MANUAL_RELEASE_MAXIMUM_COUNT to indicate a manual release barrier. |
Status_Control _CORE_barrier_Seize | ( | CORE_barrier_Control * | the_barrier, |
Thread_Control * | executing, | ||
bool | wait, | ||
Thread_queue_Context * | queue_context | ||
) |
Waits for the barrier.
This routine waits for the barrier to be released. If the barrier is set to automatic and this is the appropriate thread, then it returns immediately. Otherwise, the calling thread is blocked until the barrier is released.
[in,out] | the_barrier | The barrier to wait for. |
[in,out] | executing | The currently executing thread. |
wait | This parameter is true if the calling thread is willing to wait. | |
queue_context | The thread queue context. |
|
extern |
These thread queue operations are used for core barriers.
They are a specialization of _Thread_queue_Operations_FIFO. The only difference is that the extract operation decrements CORE_barrier_Control::number_of_waiting_threads.