Obtains the detachstate attribute of the specified thread attributes object.
pthread_attr_getdetachstate( attr, detachstate );
Argument Data Type Accessattr opaque pthread_attr_t read detachstate integer write
C Binding
#includeint pthread_attr_getdetachstate ( const pthread_attr_t *attr, int *detachstate);
Arguments
On successful completion, this routine returns a zero and the detached state attribute is set in detachstate. A value of PTHREAD_CREATE_JOINABLE indicates the thread is not detached, and a value of PTHREAD_CREATE_DETACHED indicates the thread is detached.
See the pthread_attr_setdetachstate description for information about the detachstate attribute.
Return Description0 Successful completion. [EINVAL] The value specified by attr does not refer to an existing thread attributes object.
pthread_attr_init pthread_attr_setdetachstate