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

Transition Impacts

HP-UX Software Transition Kit
» 

DSPP Home

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

threads impacts summary

 

Threads Impacts Summary

In HP-UX 10.30 and later releases, HP-UX supports 1x1 kernel threads. This enhancement has the following implications:


changes to errno, h_errno, and getdate_err

  • In traditional non-threaded applications on HP-UX, errno is a global integer. This traditional errno behavior works correctly in user space (DCE) multi-threaded applications because threads are managed in the user space and errno is a part of the context of an individual thread. In HP-UX 10.30 and later releases, thread management is done within the kernel and therefore errno has to be managed on a per-thread basis.
  • The variables getdate_err and h_errno become per-thread variables in a similar way. The names getdate_err and h_errno also are unusable for structure element names for source compiled with -D_REENTRANT that uses time.h.
  • If a shared library libother.sl is rebuilt on 10.30 or later to take advantage of the new per-thread errno feature, it may break binary compatibility for applications linked against it on earlier releases. Specifically, applications that linked with an archived libc and shared libother on a prior release will be broken. (HP-UX does not support such linkage.) Applications linked with shared libc are not broken. The solution is that the per-thread errno feature is relevant only to applications using 1x1 kernel threads. Compilation with -D_REENTRANT is not required for libraries that are not used in such applications. Application breakage can be prevented by versioning libother.1.

changes to libc

  • libc routines now support threads. Most of the routines that have been modified continue to work in a threaded application as they did in non-threaded ones, requiring no changes on the part of a programmer porting code to a threaded environment. But in some cases the interface had to be changed, and in these cases HP-UX 10.x provides two versions of the routine — the original version for non-threaded applications, and a new version for threaded applications.
  • A number of obsolete interfaces provided in libc for multi-threaded applications development in earlier releases of HP-UX have been moved from libc to a new library named libd4r. The corresponding interfaces are now thread-safe.

new man page, thread_safety(5)

For HP-UX 11i Version 1.5 on IPF, and following releases, a new man page, thread_safety(5), consolidates all thread-safety information for system functions and APIs in libc and libpthread.

Note: To include only Thread impacts when running the scansummary and scandetail tools, use the option:
  +C TH
To exclude these impacts, use the option:
  -C TH
For more information on filtering output in reports, see Filtering the Output.

 

For more information

 
Printable version
Privacy statement Using this site means you accept its terms Feedback to DSPP
© 2007 Hewlett-Packard Development Company, L.P.