This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: newbie question


In article <Pine.SOL.3.96.980202190622.24162A-100000@vertex.ucls.uchicago.edu>,
Isaac Kohn  <ikohn@vertex.ucls.uchicago.edu> wrote:
>hi all,
>
>forgive my stupidity, but what does it mean for cygwin.dll to not be
>"thread-safe"??
>
>I'm sure that if it really mattered for me i would understand completely,
>so this is mostly a question of curiosity.  thanks a lot.

It means that if you attempt to call cygwin functions from a process
which is employing multiple threads there is no guarantee that the
functions will work correctly.  The reason is that with multiple threads
it is possible for a function to be called twice from different threads
at nearly the same time.  If the function does not go to some effort to
ensure that its static or global variables are protected from multiple
access you will have situations where the value of the variable is
indeterminate because one thread could be incrementing it while another
is decrementing it, etc.

cygwin.dll does make some effort to prevent "simultaneous" access to
some data structures but some important functions (like malloc for instance)
do not currently work correctly with multiple threads.
-- 
http://www.bbc.com/	cgf@bbc.com			"Strange how unreal
VMS=>UNIX Solutions	Boston Business Computing	 the real can be."
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]