targets/Win32/plc_Win32_main.c
changeset 709 fe65601bd983
parent 685 2db8b87016a0
child 954 ab487d32ce9a
equal deleted inserted replaced
708:6ec28dc375cf 709:fe65601bd983
   167 }
   167 }
   168 
   168 
   169 /* from plc_debugger.c */
   169 /* from plc_debugger.c */
   170 int WaitDebugData(unsigned long *tick)
   170 int WaitDebugData(unsigned long *tick)
   171 {
   171 {
       
   172 	DWORD res;
       
   173 	res = WaitForSingleObject(debug_wait_sem, INFINITE);
   172     *tick = __debug_tick;
   174     *tick = __debug_tick;
   173     /* Wait signal from PLC thread */
   175     /* Wait signal from PLC thread */
   174 	return WaitForSingleObject(debug_wait_sem, INFINITE) != WAIT_OBJECT_0;
   176 	return res != WAIT_OBJECT_0;
   175 }
   177 }
   176 
   178 
   177 /* Called by PLC thread when debug_publish finished
   179 /* Called by PLC thread when debug_publish finished
   178  * This is supposed to unlock debugger thread in WaitDebugData*/
   180  * This is supposed to unlock debugger thread in WaitDebugData*/
   179 void InitiateDebugTransfer()
   181 void InitiateDebugTransfer()