OpenBSD manual page server

Manual Page Search Parameters

PTHREAD_BARRIERATTR_INIT(3) Library Functions Manual PTHREAD_BARRIERATTR_INIT(3)

pthread_barrierattr_init, pthread_barrierattr_destroy
initialize and destroy a barrier attribute object

#include <pthread.h>

int
pthread_barrierattr_init(pthread_barrierattr_t *attr);

int
pthread_barrierattr_destroy(pthread_barrierattr_t *attr);

The pthread_barrierattr_init() function creates a new barrier attribute object.

The pthread_barrierattr_destroy() function frees the resources allocated for attr.

If successful, pthread_barrierattr_init() and pthread_barrierattr_destroy() return zero; otherwise an error number is returned to indicate the error.

pthread_barrierattr_init() will fail if:
[]
The value specified by attr is invalid.
[]
The process cannot allocate enough memory to create another barrier attribute object.

pthread_barrierattr_destroy() will fail if:

[]
The value specified by attr is invalid.

pthread_barrier_init(3), pthread_barrier_wait(3), pthread_barrierattr_getpshared(3)

pthread_barrierattr_init() and pthread_barrierattr_destroy() conform to IEEE Std 1003.1-2008 (“POSIX.1”).
June 5, 2013 OpenBSD-current