HP-UX Reference (11i v2 04/09) - 3 Library Functions N-Z (vol 7)
p
pthread_launch_policy_np(3T) pthread_launch_policy_np(3T)
(Pthread Library)
PTHREAD_POLICY_RR_NP
This request establishes a round robin launch policy for the specified thread. The successive
child threads of the specified thread will be launched on different locality domains in a round
robin manner until all available locality domains have been used by threads in the launch tree.
At that point, the selection of locality domains begins again from the original locality domain.
The answer parameter is ignored.
PTHREAD_POLICY_FILL_NP
This request establishes a fill first launch policy for the specified thread. The successive child
threads of the specified thread will be launched on the same locality domain as their parent
thread until one thread has been created for each available processor in the domain. At that
point, a new locality domain is selected and successive threads are launched there until there
is one thread per processor. All available locality domains will be used before the original
domain is selected again. The answer parameter is ignored.
PTHREAD_POLICY_PACKED_NP
This request establishes a packed launch policy for the specified thread. The successive child
threads are launched on the same locality domain as their parent thread. The answer parame-
ter is ignored.
PTHREAD_POLICY_LEASTLOAD_NP
This request establishes a least loaded launch policy for the specified thread. The successive
child threads are launched on the least loaded locality domain in the processor set regardless
of the location of their parent thread. The answer parameter is ignored.
PTHREAD_POLICY_RR_TREE_NP
This request establishes a tree based round robin launch policy for the specified thread. This
request differs from PTHREAD_POLICY_RR_NP
in which threads become part of the launch
tree. This launch policy includes all descendents of the target thread in the launch tree. The
answer parameter is ignored.
PTHREAD_POLICY_FILL_TREE_NP
This request establishes a tree based fill first launch policy for the specified thread. This
request differs from PTHREAD_POLICY_FILL_NP
in which threads become part of the
launch tree. This launch policy includes all descendents of the target thread in the launch
tree. The answer parameter is ignored.
PTHREAD_POLICY_NONE_NP
This request unsets any launch policy in the thread. The system will employ a default, optimal
policy in determining where the newly created thread will be launched. The existing binding
of the thread is not changed. The answer parameter is ignored.
RETURN VALUE
Upon successful completion,
pthread_launch_policy_np()
returns zero. Otherwise, an error
number is returned to indicate the error (the
errno variable is not set).
ERRORS
If any of the following occur, the
pthread_launch_policy_np() function returns the corresponding
error number:
[EINVAL] The request parameter contains an illegal value.
[EINVAL] The value specified by answer is illegal.
[ESRCH] No thread could be found in the current process that matches the thread ID
specified in tid.
WARNINGS
pthread_launch_policy_np() is currently not supported for PTHREAD_SCOPE_PROCESS
threads. If pthread_launch_policy_np() is used on a PTHREAD_SCOPE_PROCESS thread, it is
silently ignored and zero is returned for successful completion. If the request parameter is
PTHREAD_GET_POLICY_NP, answer is set to PTHREAD_POLICY_NONE_NP. For all other request
values, answer parameter is ignored. Applications dependent on the complete implementation of
pthread_launch_policy_np() should use PTHREAD_SCOPE_SYSTEM threads.
Section 3−−796 Hewlett-Packard Company − 2 − HP-UX 11i Version 2: September 2004