summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/globals.cc
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2013-05-21 18:53:23 +0000
committerCorinna Vinschen <corinna@vinschen.de>2013-05-21 18:53:23 +0000
commit3e8d2576fdaf69955eb16225117bbe382f85a1d7 (patch)
treec453a3b10939976ea30b52fdcae7f7a25202dd73 /winsup/cygwin/globals.cc
parentcc4a1b830d1cc221b64747cbe1e3964082904333 (diff)
downloadcygnal-3e8d2576fdaf69955eb16225117bbe382f85a1d7.tar.gz
cygnal-3e8d2576fdaf69955eb16225117bbe382f85a1d7.tar.bz2
cygnal-3e8d2576fdaf69955eb16225117bbe382f85a1d7.zip
* globals.cc (__isthreaded): New global variable. Explain what it's
used for. * miscfuncs.cc (thread_wrapper): Set __isthreaded to 1 here.
Diffstat (limited to 'winsup/cygwin/globals.cc')
-rw-r--r--winsup/cygwin/globals.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/winsup/cygwin/globals.cc b/winsup/cygwin/globals.cc
index 887326156..9462c7a0c 100644
--- a/winsup/cygwin/globals.cc
+++ b/winsup/cygwin/globals.cc
@@ -75,6 +75,13 @@ bool detect_bloda = false;
bool NO_COPY in_forkee;
+/* Taken from BSD libc:
+ This variable is zero until a process has created a pthread. It is used
+ to avoid calling locking functions in libc when they are not required.
+ Note that this is moderately dangerous. Do not rely on it if the public
+ API is also used from a non-pthread thread like the signal thread. */
+int NO_COPY __isthreaded = 0;
+
int __argc_safe;
int __argc;
char **__argv;