diff --git a/kernel/timeout.c b/kernel/timeout.c index e5f3b05f2e..d10b3e6b0a 100644 --- a/kernel/timeout.c +++ b/kernel/timeout.c @@ -194,12 +194,13 @@ int32_t z_get_next_timeout_expiry(void) return ret; } -void z_set_timeout_expiry(int32_t ticks, bool idle) +void z_set_timeout_expiry(int32_t ticks, bool is_idle) { LOCKED(&timeout_lock) { - int next = next_timeout(); - bool sooner = (next == K_TICKS_FOREVER) || (ticks < next); - bool imminent = next <= 1; + int next_to = next_timeout(); + bool sooner = (next_to == K_TICKS_FOREVER) + || (ticks < next_to); + bool imminent = next_to <= 1; /* Only set new timeouts when they are sooner than * what we have. Also don't try to set a timeout when @@ -212,7 +213,7 @@ void z_set_timeout_expiry(int32_t ticks, bool idle) * in. */ if (!imminent && (sooner || IS_ENABLED(CONFIG_SMP))) { - z_clock_set_timeout(ticks, idle); + z_clock_set_timeout(ticks, is_idle); } } }