How to check thread-safety of code on routine usage

How to check thread-safety of code on routine usage

Post by Bernard Dhoogh » Thu, 15 Feb 2001 21:01:23



man getservby name says:

"Attention: Do no use the getserbybyname routine in a multithreaded
environment"

Is there a list of such routines or a checker that allows to scan
programs and check for usage of non-threadsafe routines?

Bernard Dhooghe

 
 
 

How to check thread-safety of code on routine usage

Post by Nicholas Drone » Sun, 18 Feb 2001 17:14:24



> man getservby name says:
> "Attention: Do no use the getserbybyname routine in a multithreaded
> environment"
> Is there a list of such routines or a checker that allows to scan
> programs and check for usage of non-threadsafe routines?

I'd use the multithreaded programming guide on docs.sun.com
as a reference.  The POSIX MT-safe functions are probably
the same for the commercial UNIXes.

Regards,

Nick Dronen

 
 
 

How to check thread-safety of code on routine usage

Post by Hamish Marso » Wed, 21 Feb 2001 20:31:28




>> man getservby name says:
>> "Attention: Do no use the getserbybyname routine in a multithreaded
>> environment"
>> Is there a list of such routines or a checker that allows to scan
>> programs and check for usage of non-threadsafe routines?
> I'd use the multithreaded programming guide on docs.sun.com
> as a reference.  The POSIX MT-safe functions are probably
> the same for the commercial UNIXes.

In the AIX docs there is a list of multi-threaded routines, and their
non-multi-threaded equivalent.

--

 
 
 

1. glibc2: reentrancy, thread-safety, signal-safety

I have heard that glibc2 is close to thread-safe. Does anyone know how
thread thread safety is implemented. Does thread-safety mean signal-safety
that is: I can use --say-- malloc() both in the main process-flow code and
in signal handlers. I suppose it would fairly simply to enforce
thread-safety by using library owned mutexes or critical sections. But this
would preclude signal safety because of potential deadlocks.

By the same token, does anyone know how reentrancy relates to thread-safety
and signal-safety.

Thanks.

Peter

2. IDS9.21UC2/Redhat 7.1: share library libncurses.so.4 not found

3. LinuxThreads and thread-safety, re-entrancy, async-safety!

4. Firewalling ethernet frames?

5. Linux libraries and thread-safety!!!

6. Loading OpenView Window Manager

7. A question on thread-safety

8. Another Ethernet. Ifconfig. FAQ?

9. Thread-safety of X11-app

10. atomicity / thread-safety: PF_PACKET socket and tap file descriptor

11. Solaris 8 threads: If a routine is Async-Signal-Safe is it also thread Safe?

12. Thread safety confusion Pl help

13. STL thread safety ?