From: noer AT cygnus DOT com (Geoffrey Noer) Subject: Re: B19: threads 21 Apr 1998 03:59:23 -0700 Message-ID: <199804202227.PAA09607.cygnus.gnu-win32@skaro.cygnus.com> References: <199804200421 DOT VAA00673 AT proxyb1 DOT san DOT rr DOT com> Content-Type: text To: mlx AT san DOT rr DOT com Cc: gnu-win32 AT cygnus DOT com Steve Biskis wrote: > > Whats the deal with all those: __r procedures in the run-time > that are supposed to protect the "reent" structure and make cygwinb19.dll > thread-safe ??? [...] I've seen some confusion on the list about thread-safeness with respect to Cygwin32, so I'll try to clear it up. Hopefully I won't make it worse. :-) Newlib, which is the libc/libm library used by Cygwin32, was designed to be thread-safe. If there are any issues there, they should be small and relatively easy to fix. In terms of the code for the Cygwin32 DLL, Cygwin32 uses multiple threads internally and does the necessary locking to allow that. But this does not mean that it necessarily supports multi-threaded programs. This is because the threads inside the DLL have different functions. This is not guaranteed in an arbitrary multi-threaded program. I also do not know whether the newlib reentrancy is supported by Cygwin32 properly. As I mentioned a while ago, I think supporting multi-threaded applications is relatively important for Cygwin32. In the past, since Cygnus hasn't had to run any multi-threaded programs with Cygwin32 (so far, at least), this work hasn't been a particularly high priority. This may change in the future though... -- Geoffrey Noer noer AT cygnus DOT com - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".