critical impact:
pthread_use_only_cpu - not supported; temporarily available (CrUn39)
Problem description
The pthread_use_only_cpu function exists on Tru64 UNIX, but not on HP-UX. This function will be available on a temporary basis in the Tru64 UNIX Migration Environment for HP-UX.
The pthread_use_only_cpu function allows certain applications that are highly sensitive to processor cache footprint, or that require access to specialized local devices, to restrict a thread to run only on a single specified processor. Only threads scheduled in system contention scope may be restricted to a processor using this interface. A thread may also be bound to the special CPU designation CPU_NONE in order to remove a previously defined scheduling restriction. Identifiers
 CPU_NONE |
 PTHREAD_CPU_INFLEXIBLE |
 cpuid_t |
 pthread_use_only_cpu |
See also
Solution description
The pthread_use_only_cpu function is in the Tru64 UNIX Migration Environment.
Applications will be able to use this function from the Tru64 UNIX Migration Environment for HP-UX. Please note that the Migration Environment is temporary. For a long-term solution, consider using the pthread_processor_bind_np function on HP-UX. This function is equivalent. Applications that require the capability to force a thread to run only on a particular processor should convert their code to use pthread_processor_bind_np. Like the Tru64 UNIX pthread_use_only_cpu interface, pthread_processor_bind_np is restricted to work only on threads set to be scheduled in system contention scope. As on Tru64 UNIX, HP-UX threads may be unbound by binding to a special CPU designation, PTHREAD_SPUFLOAT_NP.
On HP-UX, binding to a processor is a privileged operation. The application must be running with an effective user id of 0 (root), or with a group (not necessarily the user's primary group) that has been granted the MPCTL privilege by using setprivgrp(1M) or setprivgrp(2). To allow all applications on the HP-UX system to perform binding operations as on Tru64 UNIX, you can grant MPCTL privilege to all users with the setprivgrp -g MPCTL command. See also
Problem summary
| classifications |
source types |
OS release |
severity |
type |
| ME, TH |
C, C++ |
any HP-UX 11i version |
critical |
unavailable |
|