Open System Services System Calls Reference Manual (G06.29+, H06.08+, J06.03+)
pthread_condattr_init(2) OSS System Calls Reference Manual
NAME
pthread_condattr_init - Initializes a condition variable attributes object
LIBRARY
G-series native OSS processes: /G/system/sysnn/zsptsrl
32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library:
/G/system/zdllnnn/zputdll
64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library:
/G/system/zdllnnn/yputdll
H-series and J-series OSS processes that use the Standard POSIX Threads library:
/G/system/zdllnnn/zsptdll
SYNOPSIS
#include <pthread.h> | #include <spthread.h>
/* pthread.h is required to use POSIX User Thread Model library */
/* spthread.h is required to use Standard POSIX Threads library */
int pthread_condattr_init(
pthread_condattr_t *attr);
PARAMETERS
attr Specifies the condition variable attributes object to be initialized.
For the Standard POSIX Threads library, if the value specified is
pthread_condattr_default, then the default attribute is:
PTHREAD_PROCESS_PRIVATE
Specifies that the initialized condition variable can be used only
within a process.
DESCRIPTION
This function initializes the condition variable attributes object specified by the attr parameter
with a set of default attribute values.
When an attributes object is used to create a condition variable, the values of the individual attri-
butes determine the characteristics of the new condition variable. Attributes objects act as addi-
tional arguments to creation of condition variables. Changing individual attributes in an attri-
butes object does not affect any condition variables that were previously created using that attri-
butes object.
You can use the same condition variable attributes object in successive calls to
pthread_condattr_init( ) from any thread. If multiple threads can change attributes in a shared
condition variable attributes object, your program must use a mutex to protect the integrity of the
contents of that condition variable attributes object.
On systems running H06.21 or later H-series RVUs or J06.10 or later J-series RVUs, you can use
either the POSIX User Thread Model library or the Standard POSIX Threads library for threaded
applications.
To use this function in a threaded application that uses the POSIX User Thread Model library on
systems running H06.21 or later RVUs or J06.10 or later RVUs, you must perform all of the fol-
lowing tasks:
• Include the pthread.h header file in the application.
• Compile the application using the _PUT_MODEL_ feature test macro or equivalent
compiler command option.
5−82 Hewlett-Packard Company 527186-023