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/sigproc.h
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/sigproc.h')
-rw-r--r--winsup/cygwin/sigproc.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/winsup/cygwin/sigproc.h b/winsup/cygwin/sigproc.h
index 40f518777..2e31e578c 100644
--- a/winsup/cygwin/sigproc.h
+++ b/winsup/cygwin/sigproc.h
@@ -39,9 +39,7 @@ struct sigthread
{
DWORD id;
DWORD frame;
-#if 0
- muto *lock; // FIXME: Use for multi-thread signalling someday
-#endif
+ CRITICAL_SECTION lock;
void init (const char *s);
};
@@ -69,7 +67,9 @@ public:
{
if (st)
{
+ EnterCriticalSection (&st->lock);
st->frame = 0;
+ LeaveCriticalSection (&st->lock);
st = NULL;
}
}