* 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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user