1/*-------------------------------------------------------------------------
4 * Barriers for synchronizing cooperating processes.
6 * Portions Copyright (c) 1996-2025, PostgreSQL Global Development Group
7 * Portions Copyright (c) 1994, Regents of the University of California
9 * src/include/storage/barrier.h
11 *-------------------------------------------------------------------------
17 * For the header previously known as "barrier.h", please include
18 * "port/atomics.h", which deals with atomics, compiler barriers and memory
30 int arrived;
/* the number of participants that have
bool BarrierArriveAndDetachExceptLast(Barrier *barrier)
int BarrierParticipants(Barrier *barrier)
bool BarrierArriveAndDetach(Barrier *barrier)
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)
static THREAD_BARRIER_T barrier
ConditionVariable condition_variable