diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2017-03-21 01:21:23 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2017-03-26 22:45:58 -0400 |
commit | 59b71d5d05ca70ff8cc81296a25e14499987129c (patch) | |
tree | 084e5b8d32ed3bd8bd3ff7431ee14e52eed7703d /src/avr/timer.c | |
parent | 4dfa6c6ee454d14a006033e218acbb7fa9ced8bd (diff) | |
download | kutter-59b71d5d05ca70ff8cc81296a25e14499987129c.tar.gz kutter-59b71d5d05ca70ff8cc81296a25e14499987129c.tar.xz kutter-59b71d5d05ca70ff8cc81296a25e14499987129c.zip |
sched: Be explicit with loading of the waketime variable
Explicilty load the timer waketime variable into local variables in
sched_timer_kick(). Change the optimization level from Os to O2.
This helps gcc to avoid unnecessary reloads from memory in the common
stepper_event() case.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/avr/timer.c')
-rw-r--r-- | src/avr/timer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/avr/timer.c b/src/avr/timer.c index f1fbd284..2de97526 100644 --- a/src/avr/timer.c +++ b/src/avr/timer.c @@ -153,7 +153,7 @@ timer_periodic(void) // if the next timer is too close to schedule. Caller must disable // irqs. uint8_t -timer_try_set_next(uint32_t target) +timer_try_set_next(unsigned int target) { uint16_t next = target; int16_t diff = next - timer_get(); |