diff --git a/include/nuttx/arch.h b/include/nuttx/arch.h index a32b61396b..764434e30d 100644 --- a/include/nuttx/arch.h +++ b/include/nuttx/arch.h @@ -2053,28 +2053,6 @@ void sched_timer_expiration(void); void sched_alarm_expiration(FAR const struct timespec *ts); #endif -/**************************************************************************** - * Name: sched_process_cpuload - * - * Description: - * Collect data that can be used for CPU load measurements. - * - * Input Parameters: - * None - * - * Returned Value: - * None - * - * Assumptions/Limitations: - * This function is called from a timer interrupt handler with all - * interrupts disabled. - * - ****************************************************************************/ - -#if defined(CONFIG_SCHED_CPULOAD) && defined(CONFIG_SCHED_CPULOAD_EXTCLK) -void weak_function sched_process_cpuload(void); -#endif - /**************************************************************************** * Name: irq_dispatch * diff --git a/sched/Kconfig b/sched/Kconfig index 22b5c20fdd..01f7f6ad35 100644 --- a/sched/Kconfig +++ b/sched/Kconfig @@ -821,7 +821,7 @@ config SCHED_CPULOAD_EXTCLK achieved. This option enables use of such an "external" clock. The implementation of the clock must be provided by platform-specific logic; that platform-specific logic must call the system function - sched_process_cpuload() at each timer expiration with interrupts + nxsched_process_cpuload() at each timer expiration with interrupts disabled. if SCHED_CPULOAD_EXTCLK diff --git a/sched/sched/sched.h b/sched/sched/sched.h index 29f04b2d17..60eff4b07e 100644 --- a/sched/sched/sched.h +++ b/sched/sched/sched.h @@ -490,10 +490,10 @@ void sched_tasklist_unlock(irqstate_t lock); # define sched_islocked_tcb(tcb) ((tcb)->lockcount > 0) #endif +#if defined(CONFIG_SCHED_CPULOAD) && !defined(CONFIG_SCHED_CPULOAD_EXTCLK) /* CPU load measurement support */ -#if defined(CONFIG_SCHED_CPULOAD) && !defined(CONFIG_SCHED_CPULOAD_EXTCLK) -void weak_function sched_process_cpuload(void); +void weak_function nxsched_process_cpuload(void); #endif /* Critical section monitor */ diff --git a/sched/sched/sched_cpuload_oneshot.c b/sched/sched/sched_cpuload_oneshot.c index 6fc6c75072..bc6ad40b9b 100644 --- a/sched/sched/sched_cpuload_oneshot.c +++ b/sched/sched/sched_cpuload_oneshot.c @@ -229,10 +229,10 @@ static void nxsched_oneshot_callback(FAR struct oneshot_lowerhalf_s *lower, /* Perform CPU load measurements */ #ifdef CONFIG_HAVE_WEAKFUNCTIONS - if (sched_process_cpuload != NULL) + if (nxsched_process_cpuload != NULL) #endif { - sched_process_cpuload(); + nxsched_process_cpuload(); } /* Then restart the oneshot */ diff --git a/sched/sched/sched_cpuload_period.c b/sched/sched/sched_cpuload_period.c index 613c9db29c..c39918c76a 100644 --- a/sched/sched/sched_cpuload_period.c +++ b/sched/sched/sched_cpuload_period.c @@ -185,10 +185,10 @@ static bool nxsched_period_callback(FAR uint32_t *next_interval_us, /* Perform CPU load measurements */ #ifdef CONFIG_HAVE_WEAKFUNCTIONS - if (sched_process_cpuload != NULL) + if (nxsched_process_cpuload != NULL) #endif { - sched_process_cpuload(); + nxsched_process_cpuload(); } /* Then continue the timing */ diff --git a/sched/sched/sched_processtimer.c b/sched/sched/sched_processtimer.c index a7eddd61d3..f1ece5f6d5 100644 --- a/sched/sched/sched_processtimer.c +++ b/sched/sched/sched_processtimer.c @@ -210,10 +210,10 @@ void sched_process_timer(void) */ #ifdef CONFIG_HAVE_WEAKFUNCTIONS - if (sched_process_cpuload != NULL) + if (nxsched_process_cpuload != NULL) #endif { - sched_process_cpuload(); + nxsched_process_cpuload(); } #endif