* cygthread.cc (cygthread::simplestub): Wait for h to be filled out by main
thread before assigning it.
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user