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
» 

DSPP Home

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

critical impact:

pthread_get_expiration_np - not supported; temporarily available (CrUn259)

ME Impacts TH Impacts

Problem description

The pthread_get_expiration_np 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_get_expiration_np function obtains a value representing a desired expiration time.

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

C/C++ Functionspthread_get_expiration_np  

Old behavior

int status;
struct timespec timeout, delta = {5, 0};

pthread_get_expiration_np (&delta, &timeout);
pthread_mutex_lock (&m);
status = 0;
while (wait && status == 0)
    pthread_cond_timedwait (&cond, &m, &timeout);
pthread_mutex_unlock (&m);

See also

Solution description

The pthread_get_expiration_np is in the Tru64 UNIX Migration Environment.

Applications can use this routine from the Migration Environment. Note that the Migration Environment is temporary.

If your code relies on the pthread_get_expiration_np convenience routine, modify it to use the standard POSIX mechanism to compute a timeout.

New behavior

#define NSECS_IN_SEC (1000 * 1000 * 1000)
int status;
struct timespec timeout, delta = {5, 0};

clock_gettime (CLOCK_REALTIME, &timeout);
timeout.tv_sec += delta.tv_sec;
timeout.tv_nsec += delta.tv_nsec;
if (timeout.tv_nsec > NSECS_IN_SEC) {
    timeout.tv_nsec -= NSECS_IN_SEC;
    timeout.tv_sec += 1;
}
pthread_mutex_lock (&m);
status = 0;
while (wait && status == 0)
    pthread_cond_timedwait (&cond, &m, &timeout);
pthread_mutex_unlock (&m);

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.