Added more correct signal handling to unix timers.
--- a/drivers/timers_unix/timers_unix.c Tue Jul 29 17:20:45 2008 +0200
+++ b/drivers/timers_unix/timers_unix.c Tue Aug 19 17:30:13 2008 +0200
@@ -73,6 +73,24 @@
LeaveMutex();
}
+void canReceiveLoop_signal(int sig)
+{
+}
+/* We assume that ReceiveLoop_task_proc is always the same */
+static void (*rtai_ReceiveLoop_task_proc)(CAN_PORT) = NULL;
+
+/**
+ * Enter in realtime and start the CAN receiver loop
+ * @param port
+ */
+void unixtimer_canReceiveLoop(CAN_PORT port)
+{
+
+ /*get signal*/
+ signal(SIGTERM, canReceiveLoop_signal);
+ rtai_ReceiveLoop_task_proc(port);
+}
+
void CreateReceiveTask(CAN_PORT port, TASK_HANDLE* Thread, void* ReceiveLoopPtr)
{
pthread_create(Thread, NULL, ReceiveLoopPtr, (void*)port);