Skip to content
Commit a9aaf048 authored by Peter Mitsis's avatar Peter Mitsis Committed by Christopher Friedt
Browse files

kernel: Fixes sys_clock_tick_get()



Fixes an issue in sys_clock_tick_get() that could lead to drift in
a k_timer handler. The handler is invoked in the timer ISR as a
callback in sys_tick_announce().
  1. The handler invokes k_uptime_ticks().
  2. k_uptime_ticks() invokes sys_clock_tick_get().
  3. sys_clock_tick_get() must call elapsed() and not
     sys_clock_elapsed() as we do not want to count any
     unannounced ticks that may have elapsed while
     processing the timer ISR.

Fixes #46378

Signed-off-by: default avatarPeter Mitsis <peter.mitsis@intel.com>
(cherry picked from commit 71ef669e)
parent e2b81b48
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment