# HG changeset patch # User etisserant # Date 1220774779 -7200 # Node ID 60a221d72152493dbea760727e3ca591b2638ecf # Parent 85e92d9e34a8fb1040fd8c07ca83b810688d95cd Added __DEBUG global var to eventually change PLC code execution gehavior diff -r 85e92d9e34a8 -r 60a221d72152 targets/Linux/plc_Linux_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); } diff -r 85e92d9e34a8 -r 60a221d72152 targets/plc_common_main.c --- 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