* cygtls.cc (_threadinfo::remove): Don't assume that we are removing _my_tls.

* exceptions.cc (setup_handler): Improve debugging output.
(call_signal_handler_now): Remove ill-advised debugger call.
* sigproc.cc (sigcomplete_main): Delete.
(sig_send): Honor FIXME and avoid using main thread's completion event for
everything or suffer races.
(pending_signals::add): Default stored mask to current process mask rather than
mask at time of signal send.
(wait_sig): Add debugging output.
* sigproc.h (sigpacket::mask_storage): Delete.
This commit is contained in:
Christopher Faylor
2004-01-22 19:03:19 +00:00
parent 537ca63f8e
commit 39d06d71ff
5 changed files with 38 additions and 27 deletions

View File

@@ -140,10 +140,11 @@ _threadinfo::remove (DWORD wait)
if (here.acquired ())
{
for (size_t i = 0; i < nthreads; i++)
if (&_my_tls == cygheap->threadlist[i])
if (this == cygheap->threadlist[i])
{
if (i < --nthreads)
cygheap->threadlist[i] = cygheap->threadlist[nthreads];
debug_printf ("removed %p element %d", this, i);
break;
}
}