---
name: "pthread_condattr_init"
section: "3thr"
platform: "linux"
package: "glibc-doc"
version: "2.1.3-20"
release: "Debian 2.2 (Potato)"
platforms: ["linux"]
url: "https://new.carta.tech/pthread_condattr_init/3thr"
---

# pthread\_condattr\_init(3thr)

condition creation attributes

## NAME

pthread\_condattr\_init, pthread\_condattr\_destroy - condition creation attributes

## SYNOPSIS

**#include \<pthread.h\>**

**int pthread\_condattr\_init(pthread\_condattr\_t \****attr***);**

**int pthread\_condattr\_destroy(pthread\_condattr\_t \****attr***);**

## DESCRIPTION

Condition attributes can be specified at condition creation time, by passing a condition attribute object as second argument to  [**pthread\_cond\_init**(3)](/pthread_cond_init/3.md). Passing  **NULL** is equivalent to passing a condition attribute object with all attributes set to their default values.

The LinuxThreads implementation supports no attributes for conditions. The functions on condition attributes are included only for compliance with the POSIX standard.

**pthread\_condattr\_init** initializes the condition attribute object *attr* and fills it with default values for the attributes. **pthread\_condattr\_destroy** destroys a condition attribute object, which must not be reused until it is reinitialized. Both functions do nothing in the LinuxThreads implementation.

## RETURN VALUE

**pthread\_condattr\_init** and  **pthread\_condattr\_destroy** always return 0.

## AUTHOR

Xavier Leroy \<Xavier.Leroy@inria.fr\>

## SEE ALSO

[**pthread\_cond\_init**(3)](/pthread_cond_init/3.md).
