targets/Linux/plc_Linux_main.c
changeset 485 8b2da4b9d408
parent 483 bc26c42d2eec
child 518 8e61b0066859
equal deleted inserted replaced
483:bc26c42d2eec 485:8b2da4b9d408
   157 {
   157 {
   158     /* Prevent PLC to enter debug code */
   158     /* Prevent PLC to enter debug code */
   159     pthread_mutex_lock(&debug_mutex);
   159     pthread_mutex_lock(&debug_mutex);
   160     /*__DEBUG is protected by this mutex */
   160     /*__DEBUG is protected by this mutex */
   161     __DEBUG = !disable;
   161     __DEBUG = !disable;
       
   162     if (disable)
       
   163     	pthread_mutex_unlock(&debug_mutex);
   162 }
   164 }
   163 
   165 
   164 void resumeDebug(void)
   166 void resumeDebug(void)
   165 {
   167 {
   166     __DEBUG = 1;
   168     __DEBUG = 1;