27 unsigned int sense = ~state->sense;
28 unsigned int previous_value;
29 bool performed_release;
33 previous_value = _Atomic_Fetch_add_uint(
39 if ( previous_value + 1U == count ) {
40 _Atomic_Store_uint( &control->value, 0U, ATOMIC_ORDER_RELAXED );
41 _Atomic_Store_uint( &control->sense, sense, ATOMIC_ORDER_RELEASE );
42 performed_release =
true;
45 _Atomic_Load_uint( &control->sense, ATOMIC_ORDER_ACQUIRE ) != sense
50 performed_release =
false;
53 return performed_release;
bool _SMP_barrier_Wait(SMP_barrier_Control *control, SMP_barrier_State *state, unsigned int count)
Waits on the SMP barrier until count threads rendezvoused.
SMP barrier per-thread state.