diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2017-03-29 13:01:35 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2017-03-30 10:57:35 -0400 |
commit | 2b735daae5fb5e2d0ae0cadd4da8b2715989d6d2 (patch) | |
tree | e0c76ccced7fe47523df182c026abad9a0ff0464 /src/generic/timer.c | |
parent | f8b0c884b0baf7743dd9ebd02e933a754f0a8478 (diff) | |
download | kutter-2b735daae5fb5e2d0ae0cadd4da8b2715989d6d2.tar.gz kutter-2b735daae5fb5e2d0ae0cadd4da8b2715989d6d2.tar.xz kutter-2b735daae5fb5e2d0ae0cadd4da8b2715989d6d2.zip |
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 <kevin@koconnor.net>
Diffstat (limited to 'src/generic/timer.c')
-rw-r--r-- | src/generic/timer.c | 7 |
1 files changed, 7 insertions, 0 deletions
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); |