HP-UX Reference (11i v2 03/08) - 3 Library Functions N-Z (vol 7)
p
pthread_attr_getdetachstate(3T) pthread_attr_getdetachstate(3T)
(Pthread Library)
guardsize This parameter either specifies the new value of the guardsize attribute (set func-
tion) or it points to the memory location where the guardsize attribute of attr is to
be returned (get function).
inheritsched This parameter either specifies the new value of the inheritsched attribute (set
function) or it points to the memory location where the inheritsched attribute of attr
is to be returned (get function).
policy This parameter either specifies the new value of the schedpolicy attribute (set func-
tion) or it points to the memory location where the schedpolicy attribute of attr is to
be returned (get function).
param This parameter either specifies the new values of the schedparam attributes (set
function) or it points to the memory location where the schedparam attributes of
attr are to be returned (get function).
contentionscope
This parameter either specifies the new value of the contentionscope attribute (set
function) or it points to the memory location where the contentionscope attribute of
attr is to be returned (get function).
processor This parameter either specifies the new value of the processor attribute (set func-
tion) or it points to the memory location where the processor attribute of attr is to be
returned (get function).
binding_type This parameter either specifies the new value of the binding_type attribute (set
function) or it points to the memory location where the binding_type attribute of
attr is to be returned (get function).
DESCRIPTION
These functions set and get the attributes as described below.
pthread_attr_setdetachstate()
- set the detachstate attribute.
pthread_attr_getdetachstate()
- get the detachstate attribute.
pthread_attr_setstacksize()
- set the stacksize attribute.
pthread_attr_getstacksize()
- get the stacksize attribute.
pthread_attr_setstackaddr()
- set the stackaddr attribute.
pthread_attr_getstackaddr()
- get the stackaddr attribute.
pthread_attr_setguardsize()
- set the guardsize attribute.
pthread_attr_getguardsize()
- get the guardsize attribute.
pthread_attr_setinheritsched()
- set the inheritsched attribute.
pthread_attr_getinheritsched()
- get the inheritsched attribute.
pthread_attr_setschedpolicy()
- set the schedpolicy attribute.
pthread_attr_getschedpolicy() - get the schedpolicy attribute.
pthread_attr_setschedparam() - set the schedparam attributes.
pthread_attr_getschedparam() - get the schedparam attributes.
pthread_attr_setscope() - set the contentionscope attribute.
pthread_attr_getscope() - get the contentionscope attribute.
pthread_attr_setprocessor_np() - set the processor and binding_type attributes.
pthread_attr_getprocessor_np() - get the processor and binding_type attributes.
The attributes object attr must have previously been initialized with the function
pthread_attr_init() before these functions are called.
ATTRIBUTE: detachstate
The legal values for the detachstate attribute are:
PTHREAD_CREATE_DETACHED
This option causes all threads created with attr to be in the detached state. The resources
associated with threads having this state are reclaimed automatically by the system when the
threads terminate. Calling the pthread_detach() or pthread_join() function for
threads created with this attribute results in an error.
Section 3−−738 Hewlett-Packard Company − 2 − HP-UX 11i Version 2: August 2003