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/generic | |
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/generic')
-rw-r--r-- | src/generic/misc.h | 2 | ||||
-rw-r--r-- | src/generic/timer.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/generic/misc.h b/src/generic/misc.h index b6d49ffd..bc3223e7 100644 --- a/src/generic/misc.h +++ b/src/generic/misc.h @@ -13,7 +13,7 @@ uint32_t timer_from_us(uint32_t us); uint8_t timer_is_before(uint32_t time1, uint32_t time2); uint32_t timer_read_time(void); void timer_periodic(void); -uint8_t timer_try_set_next(uint32_t next); +uint8_t timer_try_set_next(unsigned int next); size_t alloc_maxsize(size_t reqsize); diff --git a/src/generic/timer.c b/src/generic/timer.c index 436ecb68..256ccb3d 100644 --- a/src/generic/timer.c +++ b/src/generic/timer.c @@ -50,7 +50,7 @@ static uint32_t timer_repeat_until; // if the next timer is too close to schedule. Caller must disable // irqs. uint8_t -timer_try_set_next(uint32_t next) +timer_try_set_next(unsigned int next) { uint32_t now = timer_read_time(); int32_t diff = next - now; |