diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2017-10-11 22:01:45 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2017-10-12 11:59:27 -0400 |
commit | 744c6d114e3681a2e8cfcd4475424a7d19774d52 (patch) | |
tree | e6461641b82cf0a59fe99e171a69343fcda1b78b /src/generic/timer_irq.c | |
parent | 3b9b4e4d6f68216470bcb86070033a26a3562e23 (diff) | |
download | kutter-744c6d114e3681a2e8cfcd4475424a7d19774d52.tar.gz kutter-744c6d114e3681a2e8cfcd4475424a7d19774d52.tar.xz kutter-744c6d114e3681a2e8cfcd4475424a7d19774d52.zip |
sched: Don't shutdown on a "timer in the past" if already shutdown
A shutdown will not help if the mcu is already in a shutdown state.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/generic/timer_irq.c')
-rw-r--r-- | src/generic/timer_irq.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/generic/timer_irq.c b/src/generic/timer_irq.c index 6527c949..0b4c3c8d 100644 --- a/src/generic/timer_irq.c +++ b/src/generic/timer_irq.c @@ -54,7 +54,7 @@ timer_dispatch_many(void) if (unlikely(timer_is_before(tru, now))) { // Check if there are too many repeat timers if (diff < (int32_t)(-timer_from_us(1000))) - shutdown("Rescheduled timer in the past"); + try_shutdown("Rescheduled timer in the past"); if (sched_tasks_busy()) { timer_repeat_until = now + TIMER_REPEAT_TICKS; return now + TIMER_DEFER_REPEAT_TICKS; |