aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/cygtls.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2004-01-22 19:03:19 +0000
committerChristopher Faylor <me@cgf.cx>2004-01-22 19:03:19 +0000
commit39d06d71ff60e2c65b678e41b004e00c262c938b (patch)
tree481af3287dc0d9a44d505a3e7bce03dc105976b3 /winsup/cygwin/cygtls.cc
parent537ca63f8e95a1f4f0c71e40c64c09cdbb0b74bd (diff)
downloadnewlib-39d06d71ff60e2c65b678e41b004e00c262c938b.zip
newlib-39d06d71ff60e2c65b678e41b004e00c262c938b.tar.gz
newlib-39d06d71ff60e2c65b678e41b004e00c262c938b.tar.bz2
* 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.
Diffstat (limited to 'winsup/cygwin/cygtls.cc')
-rw-r--r--winsup/cygwin/cygtls.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/winsup/cygwin/cygtls.cc b/winsup/cygwin/cygtls.cc
index 6e31d66..4833b58 100644
--- a/winsup/cygwin/cygtls.cc
+++ b/winsup/cygwin/cygtls.cc
@@ -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;
}
}