cpuload: Support the internal computation in the tickless mode

just like how the same thing done in nxsched_process_timer

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2022-04-23 09:18:44 +08:00 committed by Xiang Xiao
parent f47cf7ba04
commit b907a1fec7

View File

@ -385,6 +385,19 @@ static unsigned int nxsched_timer_process(unsigned int ticks,
clock_update_wall_time();
#endif
#if defined(CONFIG_SCHED_CPULOAD) && !defined(CONFIG_SCHED_CPULOAD_EXTCLK)
/* Perform CPU load measurements (before any timer-initiated context
* switches can occur)
*/
#ifdef CONFIG_HAVE_WEAKFUNCTIONS
if (nxsched_process_cpuload_ticks != NULL)
#endif
{
nxsched_process_cpuload_ticks(ticks);
}
#endif
/* Process watchdogs */
tmp = nxsched_process_wdtimer(ticks, noswitches);