Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ pthread_attr_getdetach_np(3) — OSF/1 3.0 αXP

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

pthread_attr_create(3)

pthread_attr_setdetach_np(3)

pthread_create(3)

pthread_attr_getdetach_np(3)  —  Subroutines

NAME

pthread_attr_getdetach_np − Obtains the detachstate attribute of thread creation. 

SYNOPSIS

#include <pthread.h>
int pthread_attr_getdetach_np(

pthread_attr_t attr );

PARAMETERS

attrThread attributes object whose detachstate attribute is obtained. 

DESCRIPTION

This routine obtains the detachstate  attribute of thread creation. The attribute specifies whether threads created using the specified thread attributes object are created in detached state. 

The default value of the detachstate attribute is PTHREAD_CREATE_JOINABLE. 

See the thread_attr_setdetach_np description for information about the detachstate attribute. 

RETURN VALUES

On successful completion, this routine returns the detachstate attribute value. The value is PTHREAD_CREATE_JOINABLE to create threads that are not detached, or PTHREAD_CREATE_DETACHED to create threads that are detached. 

If an error condition occurs, this routine returns −1 and sets errno to the corresponding error value. Possible return values are as follows:

Return Error Description
 detachstate attribute Successful completion.
−1 [EINVAL] The value specified by detachstate is invalid. 
−1 [ESRCH] The value specified by attr does not refer to an existing thread attributes object. 

RELATED INFORMATION

pthread_attr_create(3), pthread_attr_setdetach_np(3), pthread_create(3)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026