From 6a63c27542fc7b432ed438ce1d62243b5aebc3da Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Thu, 27 Jul 2017 12:19:09 -0400 Subject: sched: Support adding timers to the start of timer_list If sched_add_timer() is called on a timer that would make it the new head of the list, then add it and signal the board code that the timer should be rescheduled. Signed-off-by: Kevin O'Connor --- src/avr/timer.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'src/avr/timer.c') diff --git a/src/avr/timer.c b/src/avr/timer.c index e32a0b42..a87ae206 100644 --- a/src/avr/timer.c +++ b/src/avr/timer.c @@ -1,6 +1,6 @@ // AVR timer interrupt scheduling code. // -// Copyright (C) 2016 Kevin O'Connor +// Copyright (C) 2016,2017 Kevin O'Connor // // This file may be distributed under the terms of the GNU GPLv3 license. @@ -10,7 +10,7 @@ #include "board/misc.h" // timer_from_us #include "command.h" // shutdown #include "irq.h" // irq_save -#include "sched.h" // sched_timer_kick +#include "sched.h" // sched_timer_dispatch /**************************************************************** @@ -77,16 +77,13 @@ timer_repeat_set(uint16_t next) TIFR1 = 1<