This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
Re: B19: threads
- To: mlx at san dot rr dot com
- Subject: Re: B19: threads
- From: Geoffrey Noer <noer at cygnus dot com>
- Date: Mon, 20 Apr 1998 15:27:43 -0700 (PDT)
- Cc: gnu-win32 at cygnus dot com
Steve Biskis wrote:
>
> Whats the deal with all those: _<somefunc>_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@cygnus.com
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".