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
path: root/winsup
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2002-08-11 23:31:24 +0400
committerChristopher Faylor <me@cgf.cx>2002-08-11 23:31:24 +0400
commit5ffec1d16d6a4372f9800136be254fdf35a760d8 (patch)
treeff43f0dcbe9547722cdc99d1b18d5d360c5509ab /winsup
parent3cb62bd614c2960567f8b6ea643427daa39e8650 (diff)
* cygthread.cc (cygthread::cygthread): Close another race.
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/ChangeLog4
-rw-r--r--winsup/cygwin/cygthread.cc9
2 files changed, 12 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 1da5f3c98..07d103758 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,9 @@
2002-08-11 Christopher Faylor <cgf@redhat.com>
+ * cygthread.cc (cygthread::cygthread): Close another race.
+
+2002-08-11 Christopher Faylor <cgf@redhat.com>
+
* assert.cc (__assert): Call debugger on assertion failure if
debugging.
* dcrt0.cc (dll_crt0_1): Just wait for signal thread to go live rather
diff --git a/winsup/cygwin/cygthread.cc b/winsup/cygwin/cygthread.cc
index 00eeb25d0..d1d93375c 100644
--- a/winsup/cygwin/cygthread.cc
+++ b/winsup/cygwin/cygthread.cc
@@ -123,8 +123,15 @@ cygthread::cygthread (LPTHREAD_START_ROUTINE start, LPVOID param,
api_fatal ("name should never be NULL");
#endif
thread_printf ("name %s, id %p", name, id);
- while (ResumeThread (h) == 0)
+ while (!h || ResumeThread (h) != 1)
+#ifndef DEBUGGING
Sleep (0);
+#else
+ {
+ thread_printf ("waiting for %s<%p> to become active", __name, h);
+ Sleep (0);
+ }
+#endif
__name = name; /* Need to set after thread has woken up to
ensure that it won't be cleared by exiting
thread. */