Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2000-11-07 02:12:05 +0300
committerChristopher Faylor <me@cgf.cx>2000-11-07 02:12:05 +0300
commitc0188ae7cb897a305aea3a54058bb8d444441474 (patch)
treee6468a85855eb438b8142e2ca047ae01be6da692 /winsup/cygwin/dcrt0.cc
parenta42c18f0dd15371c4c46e1b742d889dde13321e6 (diff)
* dcrt0.cc (sigthread::init): Reinstitute sigthread lock as a critical section.
(dll_crt0_1): Move sigthread lock initialization to earlier in startup. * exceptions.cc (interrupt_on_return): Remove previous kludgy attempt to detect an invalid frame. (call_handler): Eliminate inner for loop. Grab signal critical section lock where appropriate. * sigproc.cc (proc_subproc): Restore uid setting. * sigproc.h (sigthread): Reinstitute sigthread lock as a critical section. (sigframe): Grab the sigthread lock before clearing frame to avoid having the signal thread use an invalid frame.
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. */