summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/dcrt0.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2000-05-18 03:20:01 +0000
committerChristopher Faylor <me@cgf.cx>2000-05-18 03:20:01 +0000
commit12e659efa8f172167a526f251e36571f6f976740 (patch)
treeaf0e1b0e10b0d1f85074c9a0bc2fd3aadb4fe17e /winsup/cygwin/dcrt0.cc
parent2dc173fe91dfdf9fbf2844f54bb064f43a8c0004 (diff)
downloadcygnal-12e659efa8f172167a526f251e36571f6f976740.tar.gz
cygnal-12e659efa8f172167a526f251e36571f6f976740.tar.bz2
cygnal-12e659efa8f172167a526f251e36571f6f976740.zip
* dcrt0.cc (dll_crt0_1): Initialize mainthread stuff here before anything needs
it. * sigproc.cc (sigproc_init): Move mainthread initialization out of here. * sigproc.h (sigthread): Add init() method. (sigframe): Don't try to initialize muto. * sync.cc: Undef WaitForSingleObject to avoid recursion.
Diffstat (limited to 'winsup/cygwin/dcrt0.cc')
-rw-r--r--winsup/cygwin/dcrt0.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc
index 9810fd000..6d5e8dbd7 100644
--- a/winsup/cygwin/dcrt0.cc
+++ b/winsup/cygwin/dcrt0.cc
@@ -22,6 +22,8 @@ details. */
HANDLE NO_COPY hMainProc = NULL;
HANDLE NO_COPY hMainThread = NULL;
+sigthread NO_COPY mainthread; // ID of the main thread
+
static NO_COPY char dummy_user_data[sizeof (per_process)] = {0};
per_process NO_COPY *user_data = (per_process *) &dummy_user_data;
@@ -624,6 +626,9 @@ dll_crt0_1 ()
or attach to the shared data structure if it's already running. */
shared_init ();
+ mainthread.init ("mainthread"); // For use in determining if signals
+ // should be blocked.
+
if (mypid)
set_myself (cygwin_shared->p[mypid]);