]> sourceware.org Git - newlib-cygwin.git/commitdiff
* cygthread.cc (cygthread::simplestub): Wait for h to be filled out by main
authorChristopher Faylor <me@cgf.cx>
Fri, 29 Jul 2005 14:29:33 +0000 (14:29 +0000)
committerChristopher Faylor <me@cgf.cx>
Fri, 29 Jul 2005 14:29:33 +0000 (14:29 +0000)
thread before assigning it.

winsup/cygwin/ChangeLog
winsup/cygwin/cygthread.cc

index 0a79875c8fa10ed83dd2ce5c122ed6194d472586..ebf673eccfaf13b5bc979280dcde4937985a3ab9 100644 (file)
@@ -1,4 +1,9 @@
-2005-07-29  Christopher Faylor  <cgf@timesys.com>
+2005-07-29  Arto Huusko  <arto.huusko@wmdata.fi>
+
+       * cygthread.cc (cygthread::simplestub): Wait for h to be filled out
+       by main thread before assigning it.
+
+2005-07-29  Arto Huusko  <arto.huusko@wmdata.fi>
 
        * pinfo.cc (pinfo::init): Sleep before retrying open_shared().
 
index 80fa4546d2317aa675d3b2c323ef5d7bee53d28c..6763d728398840ec27105c3788bba05c34beb2a3 100644 (file)
@@ -111,6 +111,9 @@ cygthread::simplestub (VOID *arg)
   cygthread *info = (cygthread *) arg;
   _my_tls._ctinfo = info;
   info->stack_ptr = &arg;
+  /* Wait for main thread to assign 'h' */
+  while (!info->h)
+    low_priority_sleep (0);
   info->ev = info->h;
   info->func (info->arg == cygself ? info : info->arg);
   return 0;
This page took 0.035939 seconds and 5 git commands to generate.