* 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.
This commit is contained in:
Christopher Faylor
2000-11-06 23:12:05 +00:00
parent a42c18f0dd
commit c0188ae7cb
5 changed files with 74 additions and 82 deletions

View File

@@ -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;
}
}