aboutsummaryrefslogtreecommitdiffstats
path: root/src/sched.h
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2017-07-27 12:05:29 -0400
committerKevin O'Connor <kevin@koconnor.net>2017-08-08 00:27:27 -0400
commit62f77f6bc56e0fcffdcdd4dcf2cfd6a7669099f2 (patch)
tree2f711635897b054d1f82f1d967028b8a1573a19f /src/sched.h
parent88a10fb31cce34bf3d3a740a70f661d1656b28c5 (diff)
downloadkutter-62f77f6bc56e0fcffdcdd4dcf2cfd6a7669099f2.tar.gz
kutter-62f77f6bc56e0fcffdcdd4dcf2cfd6a7669099f2.tar.xz
kutter-62f77f6bc56e0fcffdcdd4dcf2cfd6a7669099f2.zip
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>
Diffstat (limited to 'src/sched.h')
-rw-r--r--src/sched.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/sched.h b/src/sched.h
index ad5c2c08..bb6bb975 100644
--- a/src/sched.h
+++ b/src/sched.h
@@ -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);