summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/dcrt0.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/dcrt0.cc')
-rw-r--r--winsup/cygwin/dcrt0.cc9
1 files changed, 3 insertions, 6 deletions
diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc
index faa7cfa6e..4362a779e 100644
--- a/winsup/cygwin/dcrt0.cc
+++ b/winsup/cygwin/dcrt0.cc
@@ -613,9 +613,7 @@ char _declspec(dllexport) **__argv = NULL;
void
sigthread::init (const char *s)
{
-#if 0 /* FIXME: Someday we'll need this for inter-thread signalling */
- lock = new_muto (FALSE, s);
-#endif
+ InitializeCriticalSection (&lock);
id = GetCurrentThreadId ();
}
@@ -658,6 +656,8 @@ dll_crt0_1 ()
cygheap_init (); /* Initialize cygheap muto */
regthread ("main", GetCurrentThreadId ());
+ mainthread.init ("mainthread"); // For use in determining if signals
+ // should be blocked.
int envc = 0;
char **envp = NULL;
@@ -725,9 +725,6 @@ 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.
-
(void) SetErrorMode (SEM_FAILCRITICALERRORS);
/* Initialize the heap. */