wdog: fix timer IRQ busy when timer list empty

when timer list empty, should return 0 to indicate
we are no longer set time

Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
ligd 2024-07-15 23:24:39 +08:00 committed by Xiang Xiao
parent f23fb7ec09
commit b010356b26
2 changed files with 2 additions and 2 deletions

View File

@ -362,7 +362,7 @@ static clock_t nxsched_timer_process(clock_t ticks, clock_t elapsed,
tmp = nxsched_process_scheduler(ticks, elapsed, noswitches);
#if CONFIG_RR_INTERVAL > 0 || defined(CONFIG_SCHED_SPORADIC)
if (tmp > 0 && tmp < rettime)
if (tmp > 0 && (rettime == 0 || tmp < rettime))
{
rettime = tmp;
}

View File

@ -402,7 +402,7 @@ clock_t wd_timer(clock_t ticks, bool noswitches)
if (list_is_empty(&g_wdactivelist))
{
leave_critical_section(flags);
return CLOCK_MAX;
return 0;
}
/* Notice that if noswitches, expired - g_wdtickbase