--- a/targets/Xenomai/plc_Xenomai_main.c Thu Sep 22 17:35:29 2011 +0200
+++ b/targets/Xenomai/plc_Xenomai_main.c Sun Sep 25 22:51:51 2011 +0200
@@ -186,7 +186,7 @@
PLC_state |= PLC_STATE_PYTHON_FILE_OPENED;
/* create WaitDebug_pipe */
- if(rt_pipe_create(&WaitDebug_pipe, "Debug_pipe", WAITDEBUG_PIPE_MINOR, PIPE_SIZE))
+ if(rt_pipe_create(&WaitDebug_pipe, "WaitDebug_pipe", WAITDEBUG_PIPE_MINOR, PIPE_SIZE)) PLC_state |= PLC_STATE_WAITDEBUG_PIPE_CREATED;
@@ -195,7 +195,7 @@
PLC_state |= PLC_STATE_WAITDEBUG_FILE_OPENED;
/* create WaitPython_pipe */
- if(rt_pipe_create(&WaitPython_pipe, "Python_pipe", WAITPYTHON_PIPE_MINOR, PIPE_SIZE))
+ if(rt_pipe_create(&WaitPython_pipe, "WaitPython_pipe", WAITPYTHON_PIPE_MINOR, PIPE_SIZE)) PLC_state |= PLC_STATE_WAITPYTHON_PIPE_CREATED;
@@ -215,6 +215,7 @@
@@ -225,11 +226,16 @@
int TryEnterDebugSection(void)
- long old_debug_state = AtomicCompareExchange(
+ if(AtomicCompareExchange(
- return old_debug_state == DEBUG_FREE;
+ DEBUG_BUSY) == DEBUG_FREE){ + AtomicCompareExchange( &debug_state, DEBUG_BUSY, DEBUG_FREE); @@ -277,7 +283,7 @@
DEBUG_BUSY) != DEBUG_FREE &&
- if(read(Debug_pipe_fd, &cmd, sizeof(cmd)) == sizeof(cmd)){
+ if(read(Debug_pipe_fd, &cmd, sizeof(cmd)) != sizeof(cmd)){ @@ -347,3 +353,24 @@
} /* as plc does not wait for lock. */
+int CheckRetainBuffer(void) +void ValidateRetainBuffer(void) +void InValidateRetainBuffer(void) +void Retain(unsigned int offset, unsigned int count, void *p) +void Remind(unsigned int offset, unsigned int count, void *p)