targets/Win32/plc_Win32_main.c
changeset 484 3d0c06e2648c
parent 483 bc26c42d2eec
child 518 8e61b0066859
equal deleted inserted replaced
483:bc26c42d2eec 484:3d0c06e2648c
   185 {
   185 {
   186     /* Prevent PLC to enter debug code */
   186     /* Prevent PLC to enter debug code */
   187     WaitForSingleObject(debug_sem, INFINITE);
   187     WaitForSingleObject(debug_sem, INFINITE);
   188     /*__DEBUG is protected by this mutex */
   188     /*__DEBUG is protected by this mutex */
   189     __DEBUG = !disable;
   189     __DEBUG = !disable;
       
   190     if(disable)
       
   191         ReleaseSemaphore(debug_sem, 1, NULL);
   190 }
   192 }
   191 
   193 
   192 void resumeDebug()
   194 void resumeDebug()
   193 {
   195 {
   194 	__DEBUG = 1;
   196 	__DEBUG = 1;