pthread_condattr_init()

initialize condition variable attributes object 

Function


SYNOPSIS

#include <pthread.h>

int pthread_condattr_init(pthread_condattr_t *attr);


DESCRIPTION

The pthread_condattr_init() function initializes a condition variable attribute object with the default settings for each attribute, as follows:

pshared 

PTHREAD_PROCESS_PRIVATE

Condition variable is usable only within the current process.

A condition variable attribute object must be initialized prior to calling any of the pthread_condattr_setXXX functions.


PARAMETERS

attr 

Is the condition variable attribute object to be initialized.


RETURN VALUES

On success, pthread_condattr_init() returns 0. On error, one of the following values is returned:

ENOMEM 

Insufficient memory exists to create the condition variable attribute object.

EINVAL 

attr does not point to writeable memory.

EFAULT 

attr is an invalid pointer.


CONFORMANCE

POSIX P1003.1 (1996)


MULTITHREAD SAFETY LEVEL

MT-safe.


PORTING ISSUES

None.


AVAILABILITY

PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Functions:
pthread_cond_init(), pthread_condattr_destroy(), pthread_condattr_setpshared()


PTC MKS Toolkit 10.4 Documentation Build 39.