thread before assigning it.
-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().
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;