critical impact:

Problem description

These identified Application Programming Interfaces (APIs) exist only on Tru64 UNIX, and not on HP-UX. The APIs will be available on a temporary basis in the Tru64 UNIX Migration Environment for HP-UX.

On Tru64 UNIX, these functions allow applications and libraries to provide meaningful names for threads and synchronization objects they create. These names are used by debugging tools (for example, ladebug and Visual Threads), and are available to application code through the getname interfaces for logging and other diagnostic use. The Ada and Java runtime environments on Tru64 UNIX provide names for their threads and synchronization objects that can aid developers who use those libraries in debugging and analyzing the behavior of their applications. All threads and synchronization objects created by libpthread and libc are automatically identified by name at program initialization. Applications may also set their own names for threads or synchronization objects they create to aid debugging and analysis.

The Migration Environment contains Tru64 UNIX APIs, development tools, and commands and utilities to assist customers in migrating their applications from Tru64 UNIX to HP-UX.

Identifiers

pthread_attr_getname_np

pthread_key_setname_np

pthread_attr_setname_np

pthread_mutex_getname_np

pthread_cond_getname_np

pthread_mutex_setname_np

pthread_cond_setname_np

pthread_rwlock_getname_np

pthread_getname_np

pthread_rwlock_setname_np

pthread_key_getname_np

pthread_setname_np

Old behavior

A server thread might be identified as "Server 1", and the mutex that controls access to its work queue as "Server Queue". If, for example, the application were found to be hung with all threads but one waiting on a mutex, ladebug can identify that as the "Server Queue" mutex and the thread currently owning the mutex as "Server 1".

Solution description

The pthread_*name_np functions are in the Tru64 UNIX Migration Environment.

Applications can use these routines from the Tru64 UNIX Migration Environment for HP-UX to compile and link on HP-UX without change. Please note that the Migration Environment is temporary. There is no support for object naming on HP-UX, and no way to fully emulate these interfaces. They are therefore implemented as stub routines. The setname functions will only return success status, while the getname calls will return empty strings ("") and success status. Applications that depend on names for threads or synchronization objects (for example, that perform some action in a thread named "Server") must be modified to run on HP-UX.