From 2da26f78846ba13e93527bc992f35b7a9aa8199f Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Thu, 23 Oct 2014 07:13:57 -0600 Subject: [PATCH] More fixes to tickless operation, alarm/mode code. From Brandon Warhurst --- sched/sched/sched_timerexpiration.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sched/sched/sched_timerexpiration.c b/sched/sched/sched_timerexpiration.c index e844579514..2b1117fecb 100644 --- a/sched/sched/sched_timerexpiration.c +++ b/sched/sched/sched_timerexpiration.c @@ -459,6 +459,12 @@ static void sched_timer_start(unsigned int ticks) */ sched_timespec_add(&g_stop_time, &ts, &ts); + ret = up_alarm_start(&ts); + +#else + /* [Re-]start the interval timer */ + + ret = up_timer_start(&ts); #endif /* [Re-]start the interval timer */ @@ -594,7 +600,7 @@ unsigned int sched_timer_cancel(void) ts.tv_nsec = g_stop_time.tv_nsec; g_timer_interval = 0; - (void)up_timer_cancel(&g_stop_time); + (void)up_alarm_cancel(&g_stop_time); /* Convert this to the elapsed time */