From f6ac82e246a2fa3b61cff99e4c616d49404ad773 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Wed, 20 Mar 2019 19:17:30 -0600 Subject: [PATCH] Backs out part of commit d7a602e9b2caf4bdda2be2f604ced6e500a770dc. When CONFIG_SCHED_CPULOAD_EXTCLK is defined, the prototype must still be available in nuttx/arch.h --- include/nuttx/arch.h | 25 +++++++++++++++++++++++++ sched/sched/sched_cpuload.c | 5 ++++- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/include/nuttx/arch.h b/include/nuttx/arch.h index 764434e30d..89fc0cb80e 100644 --- a/include/nuttx/arch.h +++ b/include/nuttx/arch.h @@ -2053,6 +2053,31 @@ void sched_timer_expiration(void); void sched_alarm_expiration(FAR const struct timespec *ts); #endif +/**************************************************************************** + * Name: nxsched_process_cpuload + * + * Description: + * Collect data that can be used for CPU load measurements. When + * CONFIG_SCHED_CPULOAD_EXTCLK is defined, this is an exported interface, + * use the the external clock logic. Otherwise, it is an OS Internal + * interface. + * + * 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 nxsched_process_cpuload(void); +#endif + /**************************************************************************** * Name: irq_dispatch * diff --git a/sched/sched/sched_cpuload.c b/sched/sched/sched_cpuload.c index c744164099..a11986c3c1 100644 --- a/sched/sched/sched_cpuload.c +++ b/sched/sched/sched_cpuload.c @@ -154,7 +154,10 @@ static inline void nxsched_cpu_process_cpuload(int cpu) * Name: nxsched_process_cpuload * * Description: - * Collect data that can be used for CPU load measurements. + * Collect data that can be used for CPU load measurements. When + * CONFIG_SCHED_CPULOAD_EXTCLK is defined, this is an exported interface, + * use the the external clock logic. Otherwise, it is an OS Internal + * interface. * * Input Parameters: * None