January 30, 2003 PTHREAD_CONDATTR 3

### NAME

pthread_condattr_init, pthread_condattr_destroy - condition attribute operations

### LIBRARY

POSIX Thread Library (libpthread, -lpthread)

### SYNOPSIS

```int` pthread_condattr_init(```pthread_condattr_t *attr`)
```int` pthread_condattr_destroy(```pthread_condattr_t *attr`)

### DESCRIPTION

Condition attribute objects are used to specify parameters to pthread_cond_init(``). The pthread_condattr_init(``) function initializes a condition attribute object with the default attributes.

The pthread_condattr_destroy(``) function destroys a condition attribute object.

### RETURN VALUES

If successful, these functions return 0. Otherwise, an error number is returned to indicate the error.

### ERRORS

pthread_condattr_init(``) shall fail if:

[```ENOMEM`]
  Insufficient memory exists to initialize the condition attribute object.

pthread_condattr_destroy(``) may fail if:

[```EINVAL`]
  The value specified by ```attr` is invalid.

### SEE ALSO

pthread_cond_init(3)

### STANDARDS

pthread_condattr_init(``) and pthread_condattr_destroy(``) conform to ISO/IEC 9945-1:1996 (``POSIX.1'') .