SYNOPSIS
#include <pthread.h>
int pthread_cond_init(pthread_cond_t *cond, const pthread_condattr_t *attr);
DESCRIPTION
The
A condition variable can be statically initialized by assigning PTHREAD_COND_INITIALIZER in its definition, as follows:
pthread_cond_t def_cond = PTHREAD_COND_INITIALIZER;
A condition variable must be initialized (either by calling
PARAMETERS
- cond
-
Is the condition variable to initialize.
- attr
-
Specifies the attributes used for initializing the condition variable, or NULL if default attributes should be used.
RETURN VALUES
On success,
- EAGAIN
-
System resources (other than memory) are unavailable.
- EINVAL
-
attr does not refer to a valid condition variable attribute object.
- ENOMEM
-
Insufficient memory exists to initialize the condition variable.
- EFAULT
-
cond or 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_destroy() ,pthread_condattr_init()
PTC MKS Toolkit 10.4 Documentation Build 39.