Skip to content

Conversation

serhiy-katsyuba-intel
Copy link
Contributor

K_TICKS_FOREVER is defined as -1. Guard logic has been added for the case when ticks - exit_latency_ticks == -1 to prevent sys_clock_set_timeout() from incorrectly setting a forever timeout.

K_TICKS_FOREVER is defined as -1. Guard logic has been added for the case
when `ticks - exit_latency_ticks == -1` to prevent sys_clock_set_timeout()
from incorrectly setting a forever timeout.

Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
Copy link

@nashif nashif added this to the v4.2.0 milestone Jul 15, 2025
@danieldegrasse danieldegrasse added the backport v4.2-branch Request backport to the v4.2-branch label Jul 16, 2025
@danieldegrasse danieldegrasse removed this from the v4.2.0 milestone Jul 16, 2025
@nashif nashif merged commit 98dfa0a into zephyrproject-rtos:main Jul 19, 2025
28 checks passed
@kartben kartben removed the backport v4.2-branch Request backport to the v4.2-branch label Jul 19, 2025
@kartben kartben added area: ARM64 ARM (64-bit) Architecture backport v4.2-branch Request backport to the v4.2-branch labels Jul 19, 2025
@edersondisouza
Copy link
Contributor

Does this fix really work? Coverity complains that the signed and unsigned mix up in the subtraction makes the whole thing moot: https://scan9.scan.coverity.com/#/project-view/61616/12996?selectedIssue=535628
(And a small, contrived test shows coverity is right... am I missing something?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: ARM64 ARM (64-bit) Architecture area: Power Management backport v4.2-branch Request backport to the v4.2-branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.