Open System Services System Calls Reference Manual (G06.25+, H06.03+)
System Functions (n - p) pthread_condattr_init(2)
NAME
pthread_condattr_init
- Initializes a condition variable attributes object
LIBRARY
G-series native OSS processes: /G/system/sysnn/zsptsrl
H-series OSS processes: /G/system/zdllnnn/zsptdll
SYNOPSIS
#include <spthread.h>
int pthread_condattr_init(
pthread_condattr_t *attr );
PARAMETERS
attr specifies the condition variable attributes object to be initialized.
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.
NOTES
The pthread_condattr_init() and pthread_condattr_destroy( ) functions are provided for
future expansion of the threads interface and to conform with the POSIX.1c standard. These
functions are not currently useful because the functions to set and get the process share attribute
are not supported by this implementation.
RETURN VALUES
If an error condition occurs, this function returns an integer value indicating the type of error.
Possible return values are:
0 Successful completion.
[ENOMEM] Insufficient memory exists to initialize the condition variable attributes object.
RELATED INFORMATION
Functions: pthread_cond_init(2), pthread_condattr_destroy(2).
STANDARDS CONFORMANCE
This function is an extension to the XPG4 Version 2 specification. Interfaces documented on this
reference page conform to the following industry standards:
• IEEE Std 1003.1c-1995, POSIX System Application Program Interface
527186-003 Hewlett-Packard Company 5−53