Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PThreads on HP-UX 11.0

Status
Not open for further replies.

EssJayKay

Programmer
Dec 2, 2002
18
US
I am porting code from HP-UX 10.20 to HP-UX 11.0. I have several PTHREAD calls that are no longer supported. Does anyone know of new calls that are available for these functions?

1) pthread_getunique_np - i have seen some reference to pthread_self, however this returns the tread, not the uniwue ID from what I understand.

2) pthread_get_expiration_np

any help would eb appreciated.
 
Basically anything with _np is bad news. np stands for Non Portable and may not necessarily be implemented.

pthread_self () returns a pthread_t, which itself is a unique handle for the thread. You could use the handle as the id. Alternatively, put all your pthread_t in a global array and get the index from the array.

pthread_get_expiration_np works out a new timeout for pthread_cond_timedwait. You may be able to use something else to fill the timespec structure to work out your expiry time.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top