-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Labels
area: KernelbugThe issue is a bug, or the PR is fixing a bugThe issue is a bug, or the PR is fixing a bug
Description
Describe the bug
Timeout (and sleep) API has s32_t
type but it expects that timeout will be non-negative (or K_FOREVER defined as -1). Argument documentation does not specify that which may lead to confusion as user may expect that negative values will be treated as the past and timeout will expire immediately.
Example of that false assumption here:
zephyr/lib/cmsis_rtos_v2/kernel.c
Line 152 in 8e55968
k_sleep(__ticks_to_ms(ticks - ticks_elapsed)); |
Expected behavior
API should clarify that even though arguments are s32_t
only non-negative values are accepted (or specials).
Metadata
Metadata
Assignees
Labels
area: KernelbugThe issue is a bug, or the PR is fixing a bugThe issue is a bug, or the PR is fixing a bug