Operating System - HP-UX
1752812 Members
6008 Online
108789 Solutions
New Discussion юеВ

Re: Multi-thread unsafe functions on HPUX-11

 
Subbu Saripalli
New Member

Multi-thread unsafe functions on HPUX-11

I found out from techincal resources in this site that the follwoing functions are multi-thread unsafe. However, the man pages did not mention this and I do not see any reentrant functions for them. Please confirm if these functions are unsafe and so what are the alternatives.
select(), difftime(), mktime(), sigaddset(), sigdelset(), sigemptyset(), sigfillset(), gettimeofday()

Thank you!
6 REPLIES 6
Steven Gillard_2
Honored Contributor

Re: Multi-thread unsafe functions on HPUX-11

The functions you mention are perfectly safe to use in threads. I'm using select, gettimeofday, sigaddset and sigemptyset in a multi-threaded program with no problems.

What document are you reading?

Regards,
Steve
Subbu Saripalli
New Member

Re: Multi-thread unsafe functions on HPUX-11

Thank you Steve for your Reply. I appreciate if you can confirm that these functions are thread safe on HPUX 10.2 with DCE threads. ( I have a customer running our app on 10.2)
Steven Gillard_2
Honored Contributor

Re: Multi-thread unsafe functions on HPUX-11

Although I can't find any documentation to back me up, I am close to 100% sure that all the functions you listed are thread-safe with user-level DCE threads on 10.20.

Not all routines needed re-entrant interfaces because they don't use static internal data, and the routines you listed would fall into this category.

I am still very curious as to where you got the idea that these routines were thread un-safe in the first place.

Regards,
Steve
Subbu Saripalli
New Member

Re: Multi-thread unsafe functions on HPUX-11

Thank you Steve for your reply. On this hp web site(www.hp.com), when I searched for " multi thread unsafe", i found a techinal resource that compares the functions between Solaris and HPUX. It gives a list of functions in a tabular format. The resource seems to be authentic.
Steven Gillard_2
Honored Contributor

Re: Multi-thread unsafe functions on HPUX-11

Can you post the URL of the document you have found? I haven't been able to locate it.

Regards,
Steve
Subbu Saripalli
New Member

Re: Multi-thread unsafe functions on HPUX-11

It used to appear. We called HP support regarding this and may be they recalled this article.