aboutsummaryrefslogtreecommitdiffstats
path: root/src/linux/timer.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2017-10-11 22:01:45 -0400
committerKevin O'Connor <kevin@koconnor.net>2017-10-12 11:59:27 -0400
commit744c6d114e3681a2e8cfcd4475424a7d19774d52 (patch)
treee6461641b82cf0a59fe99e171a69343fcda1b78b /src/linux/timer.c
parent3b9b4e4d6f68216470bcb86070033a26a3562e23 (diff)
downloadkutter-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/linux/timer.c')
-rw-r--r--src/linux/timer.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/linux/timer.c b/src/linux/timer.c
index 016f3da3..d53dd7da 100644
--- a/src/linux/timer.c
+++ b/src/linux/timer.c
@@ -166,9 +166,8 @@ timer_dispatch(void)
if (unlikely(timespec_is_before(tru, now))) {
// Check if there are too many repeat timers
- if (unlikely(timespec_is_before(timespec_add(nt, 100000000), now))
- && !sched_is_shutdown())
- shutdown("Rescheduled timer in the past");
+ if (unlikely(timespec_is_before(timespec_add(nt, 100000000), now)))
+ try_shutdown("Rescheduled timer in the past");
if (sched_tasks_busy()) {
timer_repeat_until = timespec_add(now, TIMER_REPEAT_NS);
next_wake_time = timespec_add(now, TIMER_DEFER_REPEAT_NS);