drivers/timers_unix/timers_unix.c
changeset 507 c613e6cd34fa
parent 454 bc000083297a
child 508 08adb8d4b098
--- 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);