Backs out part of commit d7a602e9b2. When CONFIG_SCHED_CPULOAD_EXTCLK is defined, the prototype must still be available in nuttx/arch.h

This commit is contained in:
Gregory Nutt 2019-03-20 19:17:30 -06:00
parent c34ea0d3bc
commit f6ac82e246
2 changed files with 29 additions and 1 deletions

View File

@ -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
*

View File

@ -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