RTEMS
Files | Classes | Macros | Functions
SMP Barriers

The SMP barrier provides barrier synchronization for SMP systems at the lowest level. More...

Files

file  smpbarrier.h
 SMP Barrier API.
 

Classes

struct  SMP_barrier_Control
 SMP barrier control. More...
 
struct  SMP_barrier_State
 SMP barrier per-thread state. More...
 

Macros

#define SMP_BARRIER_CONTROL_INITIALIZER   { ATOMIC_INITIALIZER_UINT( 0U ), ATOMIC_INITIALIZER_UINT( 0U ) }
 SMP barrier control initializer for static initialization.
 
#define SMP_BARRIER_STATE_INITIALIZER   { 0U }
 SMP barrier per-thread state initializer for static initialization.
 

Functions

static void _SMP_barrier_Control_initialize (SMP_barrier_Control *control)
 Initializes a SMP barrier control. More...
 
static void _SMP_barrier_State_initialize (SMP_barrier_State *state)
 Initializes a SMP barrier per-thread state. More...
 
bool _SMP_barrier_Wait (SMP_barrier_Control *control, SMP_barrier_State *state, unsigned int count)
 Waits on the SMP barrier until count threads rendezvoused. More...
 

Detailed Description

The SMP barrier provides barrier synchronization for SMP systems at the lowest level.

The SMP barrier is implemented as a sense barrier, see also Herlihy and Shavit, "The Art of Multiprocessor Programming", 17.3 Sense-Reversing Barrier.

Function Documentation

◆ _SMP_barrier_Control_initialize()

static void _SMP_barrier_Control_initialize ( SMP_barrier_Control control)
inlinestatic

Initializes a SMP barrier control.

Concurrent initialization leads to unpredictable results.

Parameters
[out]controlThe SMP barrier control.

Definition at line 83 of file smpbarrier.h.

◆ _SMP_barrier_State_initialize()

static void _SMP_barrier_State_initialize ( SMP_barrier_State state)
inlinestatic

Initializes a SMP barrier per-thread state.

Parameters
[out]stateThe SMP barrier control.

Definition at line 96 of file smpbarrier.h.

◆ _SMP_barrier_Wait()

bool _SMP_barrier_Wait ( SMP_barrier_Control control,
SMP_barrier_State state,
unsigned int  count 
)

Waits on the SMP barrier until count threads rendezvoused.

Parameters
[in,out]controlThe SMP barrier control.
[in,out]stateThe SMP barrier per-thread state.
countThe thread count bound to rendezvous.
Return values
trueThis processor performed the barrier release.
falseThis processor did not performe the barrier release.

Definition at line 21 of file smpbarrierwait.c.