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

p
pthread_attr(3T) pthread_attr(3T)
(Pthread Library)
This value is currently not supported on HP-UX release 10.30.
The default value of the contentionscope attribute is not defined by POSIX.1c. On HP-UX release 10.30, the
current default value of the contentionscope attribute is
PTHREAD_SCOPE_SYSTEM
. Note: This default
value will change to
PTHREAD_SCOPE_PROCESS
when HP-UX supports the MxN Threads Model.
pthread_attr_setscope()
is used to set the contentionscope attribute in the initialized attributes
object attr. The new value of the contentionscope attribute is passed to this function in the contentionscope
parameter.
pthread_attr_getscope()
retrieves the value of the contentionscope attribute from the thread
attributes object attr. This value is returned in the contentionscope parameter.
ATTRIBUTES: processor and binding_type
The legal values for the processor attribute are:
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.
Section 3684 Hewlett-Packard Company 5 HP-UX 11i Version 1: September 2005