InitializeSynchronizationBarrier function (synchapi.h)
Initializes a new synchronization barrier.
BOOL InitializeSynchronizationBarrier( [out] LPSYNCHRONIZATION_BARRIER lpBarrier, [in] LONG lTotalThreads, [in] LONG lSpinCount );
A pointer to the SYNCHRONIZATION_BARRIER structure to initialize. This is an opaque structure that should not be modified by applications.
The maximum number of threads that can enter this barrier. After the maximum number of threads have entered the barrier, all threads continue.
The number of times an individual thread should spin while waiting for other threads to arrive at the barrier. If this parameter is -1, the thread spins 2000 times. If the thread exceeds lSpinCount, the thread blocks unless it called EnterSynchronizationBarrier with SYNCHRONIZATION_BARRIER_FLAGS_SPIN_ONLY.
TRUE if the barrier was successfully initialized. If the barrier was not successfully initialized, this function returns FALSE. Use GetLastError to get extended error information.
|Minimum supported client||Windows 8 [desktop apps only]|
|Minimum supported server||Windows Server 2012 [desktop apps only]|
|Header||synchapi.h (include Windows.h)|