sched/wdog: Replace periodcial timer with the wd_start_next.

This commit replaced periodical timer with the wd_start_next to improve the timing accuracy.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
This commit is contained in:
ouyangxiangzhen 2025-05-29 14:42:45 +08:00 committed by Alan C. Assis
parent 9d1b958524
commit efe2af643f
5 changed files with 5 additions and 5 deletions

View file

@ -64,7 +64,7 @@ static void perf_update(wdparm_t arg)
clock_t tick = (clock_t)LONG_MAX * TICK_PER_SEC / up_perf_getfreq();
perf_gettime();
wd_start((FAR struct wdog_s *)arg, tick, perf_update, arg);
wd_start_next((FAR struct wdog_s *)arg, tick, perf_update, arg);
}
/****************************************************************************

View file

@ -118,7 +118,7 @@ static void cpuload_callback(wdparm_t arg)
{
FAR struct wdog_s *wdog = (FAR struct wdog_s *)arg;
nxsched_process_cpuload_ticks(CPULOAD_SAMPLING_PERIOD);
wd_start(wdog, CPULOAD_SAMPLING_PERIOD, cpuload_callback, arg);
wd_start_next(wdog, CPULOAD_SAMPLING_PERIOD, cpuload_callback, arg);
}
#endif

View file

@ -102,7 +102,7 @@ static void profil_timer_handler(wdparm_t arg)
#endif
profil_timer_handler_cpu(prof);
wd_start(&prof->timer, PROFTICK, profil_timer_handler, arg);
wd_start_next(&prof->timer, PROFTICK, profil_timer_handler, arg);
}
/****************************************************************************