Skip to main content

pthread_barrier_wait

Function pthread_barrier_wait 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pthread_barrier_wait( barrier: *mut pthread_barrier_t, ) -> c_int
Expand description

See https://pubs.opengroup.org/onlinepubs/9799919799/functions/pthread_barrier_wait.html.

Synchronizes participating threads at the barrier referenced by barrier.

Upon success, returns PTHREAD_BARRIER_SERIAL_THREAD for a single (arbitrary) thread synchronized at the barrier and 0 for each of the other threads. Upon failure, returns an error number.

§Implementation

Not async-signal-safe.

§Safety

Undefined behaviour will occur if barrier is uninitialized.