mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-15 02:37:52 -06:00
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>
This commit is contained in:
parent
3b9b4e4d6f
commit
744c6d114e
4 changed files with 5 additions and 6 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue