From 59314d99e0e2b12720f144afff7c127b11103556 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Tue, 9 Nov 2021 19:51:40 -0500 Subject: [PATCH] sched: Move last_insert check for improved gcc code layout Signed-off-by: Kevin O'Connor --- src/sched.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sched.c b/src/sched.c index c5d1d6fd..44cce558 100644 --- a/src/sched.c +++ b/src/sched.c @@ -161,10 +161,10 @@ sched_timer_dispatch(void) // Update timer_list (rescheduling current timer if necessary) unsigned int next_waketime = updated_waketime; if (unlikely(res == SF_DONE)) { - if (SchedStatus.last_insert == t) - SchedStatus.last_insert = t->next; next_waketime = t->next->waketime; SchedStatus.timer_list = t->next; + if (SchedStatus.last_insert == t) + SchedStatus.last_insert = t->next; } else if (!timer_is_before(updated_waketime, t->next->waketime)) { next_waketime = t->next->waketime; SchedStatus.timer_list = t->next;