From 2b735daae5fb5e2d0ae0cadd4da8b2715989d6d2 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Wed, 29 Mar 2017 13:01:35 -0400 Subject: timer: Make sure to reset the timer repeat checks on a shutdown Reset the timer repeat checks on shutdown, otherwise it is possible to get into an infinite shutdown loop. Signed-off-by: Kevin O'Connor --- src/generic/timer.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/generic/timer.c') diff --git a/src/generic/timer.c b/src/generic/timer.c index 256ccb3d..5185ed54 100644 --- a/src/generic/timer.c +++ b/src/generic/timer.c @@ -94,3 +94,10 @@ timer_task(void) irq_enable(); } DECL_TASK(timer_task); + +static void +timer_irq_shutdown(void) +{ + timer_repeat_until = timer_read_time() + TIMER_IDLE_REPEAT_TICKS; +} +DECL_SHUTDOWN(timer_irq_shutdown); -- cgit v1.2.3-70-g09d2