RTEMS 6.1-rc2
Loading...
Searching...
No Matches
Files | Data Structures | Macros | Functions | Variables
Barrier Handler

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.
 

Detailed Description

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.

Function Documentation

◆ _CORE_barrier_Initialize()

void _CORE_barrier_Initialize ( CORE_barrier_Control the_barrier,
uint32_t  maximum_count 
)

Initializes the core barrier.

Parameters
[out]the_barrieris the barrier to initialize.
maximum_countis 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.

◆ _CORE_barrier_Seize()

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.

Parameters
[in,out]the_barrierThe barrier to wait for.
[in,out]executingThe currently executing thread.
waitThis parameter is true if the calling thread is willing to wait.
queue_contextThe thread queue context.
Returns
The method status.

Variable Documentation

◆ _CORE_barrier_Thread_queue_operations

const Thread_queue_Operations _CORE_barrier_Thread_queue_operations
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.