* 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.
This commit is contained in:
@@ -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]);
|
||||
|
||||
|
Reference in New Issue
Block a user