Changed canfestival plugin runtime template to reflect recent changes on unix.
--- a/plugins/canfestival/cf_runtime.c Sat May 24 15:55:46 2008 +0200
+++ b/plugins/canfestival/cf_runtime.c Sat May 24 15:56:43 2008 +0200
@@ -57,9 +57,6 @@
setState(&nodename##_Data, Stopped);\
LeaveMutex();\
canClose(&nodename##_Data);\
- #if !defined(WIN32) || defined(__CYGWIN__)\
- TimerCleanup();\
- #endif\
}
void __cleanup_%(locstr)s()
@@ -70,13 +67,13 @@
if(init_level-- > 0)
StopTimerLoop(&Exit);
+ #if !defined(WIN32) || defined(__CYGWIN__)
+ TimerCleanup();
+ #endif
}
#define NODE_OPEN(nodename)\
- #if !defined(WIN32) || defined(__CYGWIN__)\
- TimerInit();\
- #endif\
- nodename##_Data.preOperational = nodename##_preOperational;\
+ nodename##_Data.preOperational = nodename##_preOperational;\
if(!canOpen(&nodename##Board,&nodename##_Data)){\
printf("Cannot open " #nodename " Board (%%s,%%s)\n",nodename##Board.busname, nodename##Board.baudrate);\
return -1;\
@@ -92,7 +89,10 @@
return -1;
}
#endif
-
+ #if !defined(WIN32) || defined(__CYGWIN__)
+ TimerInit();
+ #endif
+
%(nodes_open)s
// Start timer thread