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)
system (and within the same scheduling domain). This attribute is generally used to indicate
that the user thread should be bound directly to a kernel-scheduled entity.
PTHREAD_SCOPE_PROCESS
Threads created with this contention scope contend directly with other threads within their
process that were created with this scheduling contention scope. This attribute is generally
used to indicate that the user thread should be unbound (not bound to any particular kernel-
scheduled entity).
The default value of the contentionscope attribute is not defined by POSIX.1c. On HP-UX release 11i Ver-
sion 1.6 and forward, the default value of the contentionscope attribute is
PTHREAD_SCOPE_PROCESS
.
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 contention-
scope 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 sys-
tem chooses. No processor binding is maintained. Specifying PTHREAD_LDOMFLOAT_NP
or
PTHREAD_SPUFLOAT_NP
cause both processor binding and locality domain binding attri-
butes 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 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
HP-UX 11i Version 2: August 2003 − 5 − Hewlett-Packard Company Section 3−−741