# HG changeset patch # User etisserant # Date 1219161722 -7200 # Node ID 08adb8d4b0984c4c5f98316d22634ef39ea25738 # Parent c613e6cd34fabdcd4c47fe9faf418c76efea284d Added more correct signal handling to unix timers. diff -r c613e6cd34fa -r 08adb8d4b098 drivers/timers_unix/timers_unix.c --- a/drivers/timers_unix/timers_unix.c Tue Aug 19 17:30:13 2008 +0200 +++ b/drivers/timers_unix/timers_unix.c Tue Aug 19 18:02:02 2008 +0200 @@ -77,7 +77,7 @@ { } /* We assume that ReceiveLoop_task_proc is always the same */ -static void (*rtai_ReceiveLoop_task_proc)(CAN_PORT) = NULL; +static void (*unixtimer_ReceiveLoop_task_proc)(CAN_PORT) = NULL; /** * Enter in realtime and start the CAN receiver loop @@ -88,12 +88,13 @@ /*get signal*/ signal(SIGTERM, canReceiveLoop_signal); - rtai_ReceiveLoop_task_proc(port); + unixtimer_ReceiveLoop_task_proc(port); } void CreateReceiveTask(CAN_PORT port, TASK_HANDLE* Thread, void* ReceiveLoopPtr) { - pthread_create(Thread, NULL, ReceiveLoopPtr, (void*)port); + unixtimer_ReceiveLoop_task_proc = ReceiveLoopPtr; + pthread_create(Thread, NULL, unixtimer_canReceiveLoop, (void*)port); } void WaitReceiveTaskEnd(TASK_HANDLE *Thread)