targets/Xenomai/plc_Xenomai_main.c
changeset 446 1edde533db19
parent 397 6a7ff66a811d
child 615 72bc3e53a1fa
--- a/targets/Xenomai/plc_Xenomai_main.c	Sun Nov 29 18:57:49 2009 +0100
+++ b/targets/Xenomai/plc_Xenomai_main.c	Tue Dec 01 13:41:29 2009 +0100
@@ -205,15 +205,16 @@
 
 extern unsigned long __tick;
 /* from plc_debugger.c */
-unsigned long WaitDebugData()
+int WaitDebugData(unsigned long *tick)
 {
     char message;
     int res;
+    *tick = __debug_tick;
     /* Wait signal from PLC thread */
     if (PLC_state & PLC_STATE_DEBUG_FILE_OPENED) {
         res = read(WaitDebug_pipe_fd, &message, sizeof(char));
         if (res == sizeof(char))
-            return __debug_tick;
+            return 0;
     }
     return -1;
 }