HP-UX Reference (11i v1 05/09) - 3 Library Functions N-Z (vol 7)
p
pthread_attr(3T) pthread_attr(3T)
(Pthread Library)
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 function)
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 func-
tion) 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 func-
tion) 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 function) 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 asso-
ciated 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.
PTHREAD_CREATE_JOINABLE
This option causes all threads created with attr to be in the joinable state. The resources associ-
ated with threads having this state are not reclaimed when the threads terminate. An applica-
tion must call the pthread_detach() or pthread_join() functions for threads created
HP-UX 11i Version 1: September 2005 − 2 − Hewlett-Packard Company Section 3−−681