summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-10-23 07:13:57 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-10-23 07:13:57 -0600
commitf6d2c32e031c11a516c062ee43eebef81790867c (patch)
treed9cd4f8bf3edac628a6ac17ed1088b5314b18b81
parentcdeb35bd1c35391541c44457f80b22b6b71c3a3b (diff)
downloadnuttx-f6d2c32e031c11a516c062ee43eebef81790867c.tar.gz
nuttx-f6d2c32e031c11a516c062ee43eebef81790867c.tar.bz2
nuttx-f6d2c32e031c11a516c062ee43eebef81790867c.zip
More fixes to tickless operation, alarm/mode code. From Brandon Warhurst
-rw-r--r--nuttx/sched/sched/sched_timerexpiration.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/nuttx/sched/sched/sched_timerexpiration.c b/nuttx/sched/sched/sched_timerexpiration.c
index e84457951..2b1117fec 100644
--- a/nuttx/sched/sched/sched_timerexpiration.c
+++ b/nuttx/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 */