--- a/targets/Linux/plc_Linux_main.c Sun Sep 25 22:51:51 2011 +0200
+++ b/targets/Linux/plc_Linux_main.c Mon Sep 26 00:24:04 2011 +0200
@@ -142,9 +142,11 @@
int WaitDebugData(unsigned long *tick)
/* Wait signal from PLC thread */
- return pthread_mutex_lock(&debug_wait_mutex);
+ res = pthread_mutex_lock(&debug_wait_mutex); /* Called by PLC thread when debug_publish finished
--- a/targets/Xenomai/plc_Xenomai_main.c Sun Sep 25 22:51:51 2011 +0200
+++ b/targets/Xenomai/plc_Xenomai_main.c Mon Sep 26 00:24:04 2011 +0200
@@ -256,11 +256,12 @@
/* Wait signal from PLC thread */
res = read(WaitDebug_pipe_fd, &cmd, sizeof(cmd));
- if (res == sizeof(cmd) && cmd == DEBUG_PENDING_DATA)
+ if (res == sizeof(cmd) && cmd == DEBUG_PENDING_DATA){ @@ -288,6 +289,8 @@
+ AtomicCompareExchange( &debug_state, DEBUG_BUSY, DEBUG_FREE);