Skip to content
Commit 9eda9350 authored by Andy Ross's avatar Andy Ross Committed by Anas Nashif
Browse files

kernel/timeout: Don't reset imminent timeouts



The logic in z_set_timeout_expiry() missed the case where the ticks
argument could be zero (or lower), which can happen naturally due to
timing/interrupt slop.  In those circumstances, it would still try to
reset a timer that was "about to expire at the next tick", which would
run afoul of the drivers' internal decisions about how soon a timer
interrupt could be set, and then get pushed out to the next tick.

Explicitly detect this as an "imminent" predicate to make the logic
clearer.

Signed-off-by: default avatarAndy Ross <andrew.j.ross@intel.com>
parent bb86f201
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment