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:
Kevin O'Connor
2017-08-07 12:33:08 -04:00
parent a9982beacf
commit 2c272f99a3
9 changed files with 60 additions and 80 deletions

View File

@@ -2,6 +2,5 @@
#define __GENERIC_TIMER_IRQ_H
uint32_t timer_dispatch_many(void);
uint32_t timer_get_next(void);
#endif // timer_irq.h