103 barrier->participants = participants;
107 barrier->static_party = participants > 0;
127 bool release =
false;
134 next_phase = start_phase + 1;
175 release =
barrier->phase == next_phase;
176 if (release &&
barrier->elected != next_phase)
286 participants =
barrier->participants;
316 if ((arrive ||
barrier->participants > 0) &&
326 last =
barrier->participants == 0;
bool BarrierArriveAndDetachExceptLast(Barrier *barrier)
int BarrierParticipants(Barrier *barrier)
bool BarrierArriveAndDetach(Barrier *barrier)
static bool BarrierDetachImpl(Barrier *barrier, bool arrive)
int BarrierAttach(Barrier *barrier)
void BarrierInit(Barrier *barrier, int participants)
int BarrierPhase(Barrier *barrier)
bool BarrierArriveAndWait(Barrier *barrier, uint32 wait_event_info)
bool BarrierDetach(Barrier *barrier)
#define Assert(condition)
bool ConditionVariableCancelSleep(void)
void ConditionVariableBroadcast(ConditionVariable *cv)
void ConditionVariablePrepareToSleep(ConditionVariable *cv)
void ConditionVariableInit(ConditionVariable *cv)
void ConditionVariableSleep(ConditionVariable *cv, uint32 wait_event_info)
static THREAD_BARRIER_T barrier
#define SpinLockInit(lock)
#define SpinLockRelease(lock)
#define SpinLockAcquire(lock)