[Return to Bookshelf] [Contents] [Previous Section] [Next Section] [Index] [Help]


pthread_condattr_init

Initializes a condition variable attributes object that can be used to specify the attributes of condition variables when they are created.

Syntax

pthread_condattr_init(
                      attr );
 


Argument Data Type Access

attr opaque pthread_ write condattr_t


C Binding

#include 

int pthread_condattr_init ( pthread_condattr_t *attr);

Arguments

attr
Condition variable attributes object to initialize.

Description

This routine initializes the condition variable attributes object (attr) that is used to specify the attributes of condition variables when they are initialized. The condition variable attributes object is initialized with the default attribute values.

When a condition variable attributes object is used to initialize a condition variable, the values of the individual attributes determine the characteristics of the new object. Attributes objects act like additional arguments to object initialization. Changing individual attributes does not affect objects that were previously initialized using the attributes object.

Return Values

If an error condition occurs, this routine returns an integer value indicating the type of error. Possible return values are as follows:
Return        Description
0             Successful completion.

[ENOMEM]      Insufficient memory exists to initialize the condition
              variable attributes object.



Associated Routines

   pthread_condattr_destroy
   pthread_cond_init



[Return to Bookshelf] [Contents] [Previous Section] [Next Section] [Index] [Help]