From 744c6d114e3681a2e8cfcd4475424a7d19774d52 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Wed, 11 Oct 2017 22:01:45 -0400 Subject: 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 --- src/linux/timer.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/linux/timer.c') 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); -- cgit v1.2.3-70-g09d2