Skip to content
Commit 71ef669e authored by Peter Mitsis's avatar Peter Mitsis Committed by Anas Nashif
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>
parent 8e55e59c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment