sched: Don't count milliseconds in the periodic timer
It's not necessary to keep a millisecond counter. Replace the two users of sched_check_periodic() with explicit task wakeup flags. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
@@ -20,11 +20,17 @@ struct timer {
|
||||
|
||||
enum { SF_DONE=0, SF_RESCHEDULE=1 };
|
||||
|
||||
// Task waking struct
|
||||
struct task_wake {
|
||||
uint8_t wake;
|
||||
};
|
||||
|
||||
// sched.c
|
||||
uint8_t sched_check_periodic(uint16_t time, uint16_t *pnext);
|
||||
void sched_add_timer(struct timer*);
|
||||
void sched_del_timer(struct timer *del);
|
||||
unsigned int sched_timer_dispatch(void);
|
||||
void sched_wake_task(struct task_wake *w);
|
||||
uint8_t sched_check_wake(struct task_wake *w);
|
||||
uint8_t sched_is_shutdown(void);
|
||||
void sched_clear_shutdown(void);
|
||||
void sched_try_shutdown(uint_fast8_t reason);
|
||||
|
||||
Reference in New Issue
Block a user