HP-UX Reference (11i v2 04/09) - 3 Library Functions N-Z (vol 7)

p
pthread_attr_getdetachstate(3T) pthread_attr_getdetachstate(3T)
(Pthread Library)
binding_type attribute is ignored.
(pthread_spu_t)
processor_id
Threads created with this processor attribute are bound to the processor specified in the pro-
cessor parameter. The type of binding (advisory or mandatory) is specified in the binding_type
attribute.
PTHREAD_LDOMINHERIT_NP
Threads created with this processor attribute inherit their processor binding and locality
domain binding attributes from the creating thread. Specifying
PTHREAD_LDOMINHERIT_NP
or PTHREAD_SPUINHERIT_NP
cause both processor binding
and locality domain binding attributes to be inherited. The binding_type attribute is ignored.
Due to differences in data types in function definitions, this value should be cast to the type
(pthread_spu_t)
.
PTHREAD_LDOMFLOAT_NP
Threads created with this processor attribute are allowed to execute on any processor the sys-
tem chooses. No locality domain binding is maintained. Specifying
PTHREAD_LDOMFLOAT_NP
or PTHREAD_SPUFLOAT_NP
cause both processor binding and
locality domain binding attributes to be cleared. The thread will be allowed to execute on any
processor in the system. The binding_type attribute is ignored. Due to differences in data
types in function definitions, this value should be cast to the type
(pthread_spu_t)
.
(pthread_ldom_t)locality_domain_id
Threads created with this processor attribute are bound to the locality domain specified in the
processor parameter. The thread will be allowed to execute on any processor within the
specified locality domain. Due to differences in data types in function definitions, this value
should be cast to the type
(pthread_spu_t)
.
The legal values for the binding_type attribute (if the processor attribute is not
PTHREAD_SPUINHERIT_NP
, PTHREAD_SPUFLOAT_NP, PTHREAD_LDOMINHERIT_NP
,or
PTHREAD_LDOMFLOAT_NP
) are:
PTHREAD_BIND_ADVISORY_NP
Threads created with this binding_type attribute have advisory processor binding to the pro-
cessor specified in the processor attribute. Refer to pthread_processor_bind_np(3T) for more
information on advisory binding.
PTHREAD_BIND_FORCED_NP
Threads created with this binding_type attribute have forced (or mandatory) processor binding
to the processor specified in the processor attribute. Refer to pthread_processor_bind_np(3T)
for more information on forced binding.
PTHREAD_BIND_LDOM_NP
Threads created with this binding_type are bound to the locality domain specified in the pro-
cessor attribute. Refer to pthread_ldom_bind_np(3T) for more information on locality domain
binding.
PTHREAD_BIND_NONE_NP
Threads created with this binding_type are not bound to any processor or locality domain. The
processor attribute is ignored. This is the default value of the binding_type attribute.
The default value of the processor attribute is
PTHREAD_SPUINHERIT_NP. The default value of the
binding_type attribute is PTHREAD_BIND_NONE_NP.
pthread_attr_setprocessor_np() is used to set the processor and binding_type attributes in the
initialized attributes object attr. The new values of the processor and binding_type attributes are passed
to this function in the processor and binding_type parameters, respectively.
pthread_attr_getprocessor_np() retrieves the values of the processor and binding_type attri-
butes from the thread attributes object attr. These values are returned in the processor and binding_type
parameters, respectively.
If the value of the processor attribute is
PTHREAD_SPUINHERIT_NP, PTHREAD_SPUFLOAT_NP,
PTHREAD_LDOMINHERIT_NP,orPTHREAD_LDOMFLOAT_NP the value of the binding_type attribute
should be ignored (float implies there will be no binding for the created thread, inherit implies that the
attribute will be set when the new thread is created based on the creating threads attributes).
HP-UX 11i Version 2: September 2004 6 Hewlett-Packard Company Section 3759