# HG changeset patch
# User etisserant
# Date 1219159813 -7200
# Node ID c613e6cd34fabdcd4c47fe9faf418c76efea284d
# Parent  c17e2e17aca821645657e1ccbf915e290f90695c
Added more correct signal handling to unix timers.

diff -r c17e2e17aca8 -r c613e6cd34fa drivers/timers_unix/timers_unix.c
--- 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);