OpenBSD manual page server

Manual Page Search Parameters

PTHREAD_BARRIERATTR_GETPSHARED(3) Library Functions Manual PTHREAD_BARRIERATTR_GETPSHARED(3)

pthread_barrierattr_getpshared, pthread_barrierattr_setpsharedget or set the process-shared attribute of the barrier attribute's object

#include <pthread.h>

int
pthread_barrierattr_getpshared(pthread_barrierattr_t *attr, int *pshared);

int
pthread_barrierattr_setpshared(pthread_barrierattr_t *attr, int pshared);

The () function writes in pshared the current process-shared attribute value.

The () function sets the process-shared attribute as indicated in pshared.

If successful, pthread_barrierattr_getpshared() and pthread_barrierattr_setpshared() will return zero, otherwise an error number will be returned to indicate the error.

pthread_barrierattr_getpshared() will fail if:

[]
The value specified by attr is invalid.

pthread_barrierattr_setpshared() will fail if:

[]
The value specified by attr is invalid.
[]
The value specified by pshared is not PTHREAD_PROCESS_PRIVATE.

pthread_barrier_init(3), pthread_barrier_wait(3), pthread_barrierattr_init(3)

pthread_barrierattr_getpshared() and pthread_barrierattr_setpshared() conform to IEEE Std 1003.1-2008 (“POSIX.1”).

Currently only private barriers are supported and the pshared attribute is always set that way. Any attempts to change that value will trigger ENOTSUP.

February 22, 2023 OpenBSD-7.5