diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2024-10-21 14:26:48 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2024-10-26 22:09:14 -0400 |
commit | ea546c789b4d1278078187b386ba85f324267892 (patch) | |
tree | e8259e73ac8385ff1644026c5da24c9c8c38634c /src/sched.h | |
parent | f0a779771249948429e9c88dbec93cb467b606c5 (diff) | |
download | kutter-ea546c789b4d1278078187b386ba85f324267892.tar.gz kutter-ea546c789b4d1278078187b386ba85f324267892.tar.xz kutter-ea546c789b4d1278078187b386ba85f324267892.zip |
sched: Improve timer vs task priority check
Rename sched_tasks_busy() to sched_check_set_tasks_busy() and change
it to only return true if tasks are active (running or requested) for
two consecutive calls. This makes it less likely that timers will
yield to tasks except when tasks really are notably backlogged.
This also makes it less likely that multiple steppers controlling the
same rail will be interrupted by tasks mid-step. This should slightly
improve the timing, and make it less likely that a halt during
homing/probing will occur with these steppers taking a different
number of total steps.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/sched.h')
-rw-r--r-- | src/sched.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sched.h b/src/sched.h index 0a2bdc4b..9ec96631 100644 --- a/src/sched.h +++ b/src/sched.h @@ -31,7 +31,7 @@ void sched_del_timer(struct timer *del); unsigned int sched_timer_dispatch(void); void sched_timer_reset(void); void sched_wake_tasks(void); -uint8_t sched_tasks_busy(void); +uint8_t sched_check_set_tasks_busy(void); void sched_wake_task(struct task_wake *w); uint8_t sched_check_wake(struct task_wake *w); uint8_t sched_is_shutdown(void); |