Open System Services System Calls Reference Manual (G06.25+, H06.03+)
System Functions (n - p) pthread_attr_getdetachstate(2)
NAME
pthread_attr_getdetachstate
- Obtains the detachstate attribute of a thread 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_attr_getdetachstate(
const pthread_attr_t *attr,
int *detachstate );
PARAMETERS
attr specifies the address of the thread attributes object whose detachstate attribute
is obtained.
detachstate receives the value of the detachstate attribute.
DESCRIPTION
This function obtains the value of the detachstate attribute of the thread attributes object
specified by the attr parameter and returns it in the detachstate parameter. This attribute
specifies whether threads created using the specified thread attributes object are created in a
detached state.
See the pthread_attr_setdetachstate(2) reference page either online or in the Open System Ser-
vices System Calls Reference Manual for information about the detachstate attribute.
RETURN VALUES
On successful completion, this function returns a zero and the detachstate attribute value is
returned in detachstate. The attribute value PTHREAD_CREATE_JOINABLE indicates the
thread is not detached, and the attribute value PTHREAD_CREATE_DETACHED indicates
the thread is detached.
If an error condition occurs, this function returns an integer value indicating the type of error.
Possible return values are:
0 Successful completion.
[EINVAL] The attr parameter does not refer to an existing thread attributes object.
RELATED INFORMATION
Functions: pthread_attr_init(2), pthread_attr_setdetachstate(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
The use of the header file spthread.h is an HP exception to the POSIX standard.
527186-003 Hewlett-Packard Company 5−19