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:
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 6e31d66e6..4833b58d2 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;
}
}