From 2c272f99a3fac49d8acd4b49a1aa3302225f17b8 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Mon, 7 Aug 2017 12:33:08 -0400 Subject: 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 --- src/sched.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/sched.h') diff --git a/src/sched.h b/src/sched.h index ba883778..ffe17e03 100644 --- a/src/sched.h +++ b/src/sched.h @@ -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); -- cgit v1.2.3-70-g09d2