targets/Win32/plc_Win32_main.c
changeset 3947 9b5cb90297e4
parent 3850 722846bd6680
equal deleted inserted replaced
3946:8815b44be31e 3947:9b5cb90297e4
   144     else{
   144     else{
   145         return 1;
   145         return 1;
   146     }
   146     }
   147     return 0;
   147     return 0;
   148 }
   148 }
   149 static unsigned long __debug_tick;
   149 static unsigned int __debug_tick;
   150 
   150 
   151 int TryEnterDebugSection(void)
   151 int TryEnterDebugSection(void)
   152 {
   152 {
   153 	//printf("TryEnterDebugSection\n");
   153 	//printf("TryEnterDebugSection\n");
   154     if(WaitForSingleObject(debug_sem, 0) == WAIT_OBJECT_0){
   154     if(WaitForSingleObject(debug_sem, 0) == WAIT_OBJECT_0){
   185     CloseHandle(python_sem);
   185     CloseHandle(python_sem);
   186     CloseHandle(PLC_thread);
   186     CloseHandle(PLC_thread);
   187 }
   187 }
   188 
   188 
   189 /* from plc_debugger.c */
   189 /* from plc_debugger.c */
   190 int WaitDebugData(unsigned long *tick)
   190 int WaitDebugData(unsigned int *tick)
   191 {
   191 {
   192 	DWORD res;
   192 	DWORD res;
   193 	res = WaitForSingleObject(debug_wait_sem, INFINITE);
   193 	res = WaitForSingleObject(debug_wait_sem, INFINITE);
   194     *tick = __debug_tick;
   194     *tick = __debug_tick;
   195     /* Wait signal from PLC thread */
   195     /* Wait signal from PLC thread */