-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Description
There are currently 20 missing POSIX functions with trivial implementations, pthread_barrierattr_getpshared()
is one of them.
pthread_barrierattr_getpshared, pthread_barrierattr_setpshared - get and set the process-shared attribute of the barrier attributes object
The pthread_barrierattr_getpshared() function shall obtain the value of the process-shared attribute from the attributes object referenced by attr. The pthread_barrierattr_setpshared() function shall set the process-shared attribute in an initialized attributes object referenced by attr.
The process-shared attribute is set to PTHREAD_PROCESS_SHARED to permit a barrier to be operated upon by any thread that has access to the memory where the barrier is allocated. See Synchronization Object Copies and Alternative Mappings for further requirements. The default value of the attribute shall be PTHREAD_PROCESS_PRIVATE. Both constants PTHREAD_PROCESS_SHARED and PTHREAD_PROCESS_PRIVATE are defined in <pthread.h>.
Additional attributes, their default values, and the names of the associated functions to get and set those attribute values are implementation-defined.
The behavior is undefined if the value specified by the attr argument to pthread_barrierattr_getpshared() or pthread_barrierattr_setpshared() does not refer to an initialized barrier attributes object.
See https://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_barrierattr_getpshared.html
See RFC #51211 for more info.