Jump to content
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
HP.com home

Transition Impacts

Tru64 UNIX Software Transition Kit


» HP STK home
» Home
» Overview
» Tools
» Documentation
» Transition impacts
» Identifier types
» Impact list
» Porting to HP-UX
» Glossary
» Help
» Send us feedback
Site maps
» Tru64 UNIX STK
Content starts here

critical impact:

pthread_*name_np interfaces - not supported; temporarily available (CrUn78)

ME Impacts TH Impacts

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.


C/C++ Functionspthread_attr_getname_np C/C++ Functionspthread_key_setname_np
C/C++ Functionspthread_attr_setname_np C/C++ Functionspthread_mutex_getname_np
C/C++ Functionspthread_cond_getname_np C/C++ Functionspthread_mutex_setname_np
C/C++ Functionspthread_cond_setname_np C/C++ Functionspthread_rwlock_getname_np
C/C++ Functionspthread_getname_np C/C++ Functionspthread_rwlock_setname_np
C/C++ Functionspthread_key_getname_np C/C++ Functionspthread_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".

See also

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.

See also

Problem summary

classifications source types OS release severity type
ME, TH C, C++ any HP-UX 11i version critical unavailable
Printable version
Privacy statement Using this site means you accept its terms Feedback to DSPP
© 2007 Hewlett-Packard Development Company, L.P.