# HG changeset patch # User etisserant # Date 1150727712 -7200 # Node ID 3e24a4d68325ecee15460046c2ae60d04b9283c4 # Parent c767eabbaaac8d024cb0d54252c8ebf64468256d Fixed Xeno crash when no more alarm are set... diff -r c767eabbaaac -r 3e24a4d68325 drivers/timers_xeno/timers_xeno.c --- a/drivers/timers_xeno/timers_xeno.c Mon Jun 19 14:19:23 2006 +0200 +++ b/drivers/timers_xeno/timers_xeno.c Mon Jun 19 16:35:12 2006 +0200 @@ -124,10 +124,11 @@ { rt_task_delete(&Thread); } -#define max(a,b) a>b?a:b + +//#define max(a,b) a>b?a:b void setTimer(TIMEVAL value) { - last_alarm_set = last_time_read + value; + last_alarm_set = (value == TIMEVAL_MAX) ? TIMEVAL_MAX : last_time_read + value; rt_task_unblock(&timerloop_task); }