pthread_barrier_wait(3) - NetBSD Manual Pages

PTHREAD_BARRIER_WAIT(3) NetBSD Library Functions ManualPTHREAD_BARRIER_WAIT(3)


NAME
pthread_barrier_wait -- wait for a barrier
LIBRARY
POSIX Threads Library (libpthread, -lpthread)
SYNOPSIS
#include <pthread.h> int pthread_barrier_wait(pthread_barrier_t *barrier);
DESCRIPTION
The pthread_barrier_wait() function causes the current thread to wait on the barrier specified. Once as many threads as specified by the count parameter to the corresponding pthread_barrier_init() call have called pthread_barrier_wait(), all threads will wake up, return from their respective pthread_barrier_wait() calls and continue execution.
RETURN VALUES
If successful, pthread_barrier_wait() will return zero for all waiting threads except for one. One thread will receive status PTHREAD_BARRIER_SERIAL_THREAD, which is intended to indicate that this thread may be used to update shared data. It is the responsibility of this thread to insure the visibility and atomicity of any updates to shared data with respect to the other threads participating in the bar- rier. In the case of failure, an error value will be returned.
ERRORS
pthread_barrier_wait() may fail if: [EINVAL] The value specified by barrier is invalid.
SEE ALSO
pthread_barrier_destroy(3), pthread_barrier_init(3), pthread_barrierattr_destroy(3), pthread_barrierattr_init(3)
STANDARDS
pthread_barrier_wait() conforms to IEEE Std 1003.1-2001 (``POSIX.1''). NetBSD 5.1.2 January 30, 2003 NetBSD 5.1.2

Powered by man-cgi (2024-08-26). Maintained for NetBSD by Kimmo Suominen. Based on man-cgi by Panagiotis Christias.