--- a/drivers/timers_unix/timers_unix.c Thu Apr 05 10:06:11 2007 +0200
+++ b/drivers/timers_unix/timers_unix.c Fri Apr 06 16:49:28 2007 +0200
@@ -54,14 +54,18 @@
void StopTimerLoop(void)
{
+ EnterMutex();
timer_delete (timer);
+ LeaveMutex();
}
void StartTimerLoop(TimerCallback_t init_callback)
{
initTimer();
+ EnterMutex();
// At first, TimeDispatch will call init_callback.
SetAlarm(NULL, 0, init_callback, 0, 0);
+ LeaveMutex();
}
void CreateReceiveTask(CAN_PORT port, TASK_HANDLE* Thread, void* ReceiveLoopPtr)