HP-UX Reference (11i v3 07/02) - 3 Library Functions N-Z (vol 7)

p
pthread_attr_getdetachstate(3T) pthread_attr_getdetachstate(3T)
(Pthread Library)
PTHREAD_SPUINHERIT_NP
Threads created with this processor attribute inherit their processor binding attributes from the
creating thread. This is the default value of the processor attribute. 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.
PTHREAD_SPUFLOAT_NP
Threads created with this processor attribute are allowed to execute on any processor the system
chooses. No processor 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.
(pthread_spu_t)
processor_id
Threads created with this processor attribute are bound to the processor specified in the proces-
sor 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 attri-
butes 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 system
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 proces-
sor specified in the processor attribute. Refer to pthread_processor_bind_np(3T) for more infor-
mation 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 proces-
sor attribute. Refer to pthread_ldom_bind_np(3T) for more information on locality domain bind-
ing.
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.
HP-UX 11i Version 3: February 2007 6 Hewlett-Packard Company 167