Multithreaded Programming Guide

Getting a Barrier Process-Shared Attribute

The pthread_barrierattr_getpshared(3C) function obtains the value of the process-shared attribute from the attributes object referenced by attr. The value is set by the pthread_barrierattr_setpshared() function.

pthread_barrierattr_getpshared() Syntax

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

pthread_barrierattr_getpshared() Return Values

pthread_barrierattr_getpshared() returns zero after completing successfully, and stores the value of the process-shared attribute of attr into the object referenced by the pshared parameter. Any other return value indicates that an error occurred. If the following condition occurs, the function fails and returns the corresponding value.


EINVAL

Description:

Indicates that the value of attr was not valid.