In case of tickless kernel, k_busy_wait() calls __enable_sys_clock() which in turn calls _set_time() with maximum RTC counter programmable value. This will set the expected_sys_ticks to maximum tick value even though there is no explicit timeout is requested from the kernel or from an application. In this scenario, if an app calls k_sleep() which in turn calls _add_timeout() which will adjust timeout value as per the elapsed program time which based on incorrectly set expected_sys_ticks. To fix this issue, we should not set the expected_sys_ticks in case of __enable_sys_clock() as it just requests to run the counter but a timeout event request. Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com> |
||
|---|---|---|
| .. | ||
| altera_avalon_timer_hal.c | ||
| arcv2_timer0.c | ||
| CMakeLists.txt | ||
| cortex_m_systick.c | ||
| hpet.c | ||
| Kconfig | ||
| loapic_timer.c | ||
| native_posix_timer.c | ||
| nrf_rtc_timer.c | ||
| pulpino_timer.c | ||
| riscv_machine_timer.c | ||
| sys_clock_init.c | ||
| xtensa_sys_timer.c | ||