* cygthread.cc (cygthread::cygthread): Close another race.
This commit is contained in:
parent
3cb62bd614
commit
5ffec1d16d
|
@ -1,3 +1,7 @@
|
|||
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
|
||||
|
|
|
@ -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. */
|
||||
|
|
Loading…
Reference in New Issue