This routine obtains the detachstate attribute of a thread attributes object. This attribute specifies whether threads created using the specified thread attributes object are created in a detached state. On successful completion, this routine returns a zero and the detachstate 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.