-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Labels
bugThe issue is a bug, or the PR is fixing a bugThe issue is a bug, or the PR is fixing a bugpriority: highHigh impact/importance bugHigh impact/importance bug
Description
This provides an issue backing #30842 which by inspection is correct and appears to be high priority. With legacy timeouts Z_TIMEOUT_TICKS converts the tick count to a timeout which is expressed in milliseconds, not ticks.
Ticks should be assigned directly to timeout value in case of
CONFIG_LEGACY_TIMEOUT_API=y, just as they were before referenced patch.
Fixes: 7a815d5 ("kernel: sched: Use k_ticks_t in z_tick_sleep")
Tested with:
LOG_INF("uptime: %d", (int) k_uptime_get());
k_sleep(K_SECONDS(1));
LOG_INF("uptime: %d", (int) k_uptime_get());
in ztest framework.
Before this PR:
I: uptime: 2070400
I: uptime: 2080500
after:
I: uptime: 207040
I: uptime: 208050
Metadata
Metadata
Labels
bugThe issue is a bug, or the PR is fixing a bugThe issue is a bug, or the PR is fixing a bugpriority: highHigh impact/importance bugHigh impact/importance bug