cpuload: nxsched_cpu_process_cpuload: add ticks parameter

Signed-off-by: zhuyanlin <zhuyanlin1@xiaomi.com>
This commit is contained in:
zhuyanlin
2022-05-10 21:21:19 +08:00
committed by Xiang Xiao
parent 45fe3fb4c6
commit 6facf18a01
2 changed files with 58 additions and 6 deletions
+26 -1
View File
@@ -1863,7 +1863,7 @@ int up_timer_start(FAR const struct timespec *ts);
#ifdef CONFIG_SCHED_THREAD_LOCAL
int up_tls_size(void);
#else
#define up_tls_size() sizeof(struct tls_info_s)
#define up_tls_size() sizeof(struct tls_info_s)
#endif
/****************************************************************************
@@ -2303,6 +2303,31 @@ void nxsched_alarm_expiration(FAR const struct timespec *ts);
void weak_function nxsched_process_cpuload(void);
#endif
/****************************************************************************
* Name: nxsched_process_cpuload_ticks
*
* 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:
* ticks - The ticks that we increment in this cpuload
*
* 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_ticks(uint32_t ticks);
#endif
/****************************************************************************
* Name: irq_dispatch
*