mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-09 15:57:56 -06:00
sched: Implement generic sleep mechanism based on tasks pending
Track when tasks are pending and spin in irq_wait() when no tasks are pending. This improves the mechanism for sleeping the processor - it's simpler for the board specific code and it reduces the possibility of the processor sleeping when tasks are busy. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
a9982beacf
commit
2c272f99a3
9 changed files with 60 additions and 80 deletions
|
@ -30,6 +30,7 @@ void sched_add_timer(struct timer*);
|
|||
void sched_del_timer(struct timer *del);
|
||||
unsigned int sched_timer_dispatch(void);
|
||||
void sched_wake_tasks(void);
|
||||
uint8_t sched_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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue