www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/02/03/09:48:19

From: cgf AT bbc DOT com (Christopher Faylor)
Subject: Re: newbie question
3 Feb 1998 09:48:19 -0800 :
Message-ID: <Ent30E.1o8.cygnus.gnu-win32@bbc.com>
References: <Pine DOT SOL DOT 3 DOT 96 DOT 980202190622 DOT 24162A-100000 AT vertex DOT ucls DOT uchicago DOT edu>
Reply-To: cgf AT bbc DOT com
To: gnu-win32 AT cygnus DOT com

In article <Pine DOT SOL DOT 3 DOT 96 DOT 980202190622 DOT 24162A-100000 AT vertex DOT ucls DOT uchicago DOT edu>,
Isaac Kohn  <ikohn AT vertex DOT ucls DOT uchicago DOT 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 AT bbc DOT 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 AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019