From 0a3c23bcf65cba76fc9cad2854504586901ea5e9 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Fri, 10 Mar 2017 20:03:56 -0500 Subject: sched: Avoid rescheduling the currently active timer It's tricky to reschedule the timer irq correctly (due to race conditions with the irq) and in practice it's very rarely needed. Handle the special cases in the generic sched.c code so that the board code doesn't have to handle it. Signed-off-by: Kevin O'Connor --- src/avr/timer.c | 42 ++++++++++++------------------------------ 1 file changed, 12 insertions(+), 30 deletions(-) (limited to 'src/avr/timer.c') diff --git a/src/avr/timer.c b/src/avr/timer.c index a6da9b4f..06d8845e 100644 --- a/src/avr/timer.c +++ b/src/avr/timer.c @@ -38,13 +38,6 @@ timer_set(uint16_t next) OCR1A = next; } -static inline void -timer_set_clear(uint16_t next) -{ - OCR1A = next; - TIFR1 = 1<