Added __DEBUG global var to eventually change PLC code execution gehavior
authoretisserant
Sun, 07 Sep 2008 10:06:19 +0200
changeset 245 60a221d72152
parent 244 85e92d9e34a8
child 246 3613c6ee9e0e
Added __DEBUG global var to eventually change PLC code execution gehavior
targets/Linux/plc_Linux_main.c
targets/plc_common_main.c
--- a/targets/Linux/plc_Linux_main.c	Sun Sep 07 10:03:23 2008 +0200
+++ b/targets/Linux/plc_Linux_main.c	Sun Sep 07 10:06:19 2008 +0200
@@ -137,12 +137,14 @@
 
 void suspendDebug()
 {
+    __DEBUG = 0;
     /* Prevent PLC to enter debug code */
     pthread_mutex_lock(&debug_mutex);
 }
 
 void resumeDebug()
 {
+    __DEBUG = 1;
     /* Let PLC enter debug code */
     pthread_mutex_unlock(&debug_mutex);
 }
--- a/targets/plc_common_main.c	Sun Sep 07 10:03:23 2008 +0200
+++ b/targets/plc_common_main.c	Sun Sep 07 10:06:19 2008 +0200
@@ -33,12 +33,10 @@
  **/
  
 IEC_TIME __CURRENT_TIME;
+IEC_BOOL __DEBUG;
 int __tick = -1;
 
 static int init_level = 0;
-static int Debugging = 0;
-static int WasDebugging = 0;
-void AbortDebug();
 
 /*
  * Prototypes of functions exported by plugins