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:
parent
f23fb7ec09
commit
b010356b26
@ -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;
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user