From 59b71d5d05ca70ff8cc81296a25e14499987129c Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Tue, 21 Mar 2017 01:21:23 -0400 Subject: 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 --- src/avr/timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/avr/timer.c') 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(); -- cgit v1.2.3-70-g09d2