pthread_condattr_create(3thr)pthread_condattr_create(3thr)Namepthread_condattr_create - Creates a condition variable attributes
object that is used to specify the attributes of condition variables
when they are created.
Syntax
#include <pthread.h>
int pthread_condattr_create (attr)
pthread_condattr_t *attr;
Arguments
attr Condition variable attributes object that is created.
Description
This routine creates a condition variable attributes object that is
used to specify the attributes of condition variables when they are
created. The condition variable attributes object is initialized with
the default value for all of the attributes defined by a given imple‐
mentation.
When a condition variable attributes object is used to create a condi‐
tion variable, the values of the individual attributes determine the
characteristics of the new object. Attributes objects act like addi‐
tional arguments to object creation. Changing individual attributes
does not affect objects that were previously created using the
attributes object.
Return Values
The created condition variable attributes object is returned to the
attr argument.
If an error condition occurs, this routine returns -1 and sets errno to
the corresponding error value. Possible return values are as follows.
Return Error Description
0 Successful comple‐
tion.
-1 [ENOMEM] Insufficient memory
exists to create
the condition vari‐
able attributes
object.
pthread_condattr_create(3thr)