PTHREAD_BARRIERATTR_GETPSHARED(3) | Library Functions Manual | PTHREAD_BARRIERATTR_GETPSHARED(3) |
pthread_barrierattr_getpshared
,
pthread_barrierattr_setpshared
—
get and 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
pthread_barrierattr_getpshared
()
function writes in pshared the current process-shared
attribute value.
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:
EINVAL
]pthread_barrierattr_setpshared
() will fail
if:
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
.
April 6, 2020 | OpenBSD-current |