aboutsummaryrefslogtreecommitdiffstats
path: root/src/sched.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2016-06-08 21:33:50 -0400
committerKevin O'Connor <kevin@koconnor.net>2016-06-14 14:00:53 -0400
commitb0524947e5a86bdbdd58dab42de3363a627e6910 (patch)
tree1187da49413ab45f0133372ce2778e19a34097c4 /src/sched.c
parentfa85094cbb139c734150802b02e22913abcfccb3 (diff)
downloadkutter-b0524947e5a86bdbdd58dab42de3363a627e6910.tar.gz
kutter-b0524947e5a86bdbdd58dab42de3363a627e6910.tar.xz
kutter-b0524947e5a86bdbdd58dab42de3363a627e6910.zip
sched: Use uint_fast8_t for return type of timers
Some architectures are faster passing regular integers than 8bit integers. Use uint_fast8_t so that the architecture chooses the appropriate type. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/sched.c')
-rw-r--r--src/sched.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sched.c b/src/sched.c
index 99e37dd6..6b9ec16f 100644
--- a/src/sched.c
+++ b/src/sched.c
@@ -25,7 +25,7 @@ static uint16_t millis;
// also simplifies the timer code by ensuring there is always at least
// one timer on the timer list and that there is always a timer not
// more than 1 ms in the future.
-static uint8_t
+static uint_fast8_t
ms_event(struct timer *t)
{
millis++;
@@ -154,7 +154,7 @@ sched_timer_kick(void)
struct timer *t = timer_list;
for (;;) {
// Invoke timer callback
- uint8_t res;
+ uint_fast8_t res;
if (CONFIG_INLINE_STEPPER_HACK && likely(!t->func))
res = stepper_event(t);
else