* cygthread.cc (cygthread::simplestub): Wait for h to be filled out by main
thread before assigning it.
This commit is contained in:
		
							parent
							
								
									40c125cf38
								
							
						
					
					
						commit
						2b3fc7325c
					
				|  | @ -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(). | ||||
| 
 | ||||
|  |  | |||
|  | @ -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; | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue