You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2022/08/27 12:39:47 UTC
[incubator-nuttx] branch master updated: cpuload: fix cpuload error
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 51d31cc4a2 cpuload: fix cpuload error
51d31cc4a2 is described below
commit 51d31cc4a2e68eaa326f8d52cc6e237ce5618328
Author: ligd <li...@xiaomi.com>
AuthorDate: Fri Aug 26 22:31:53 2022 +0800
cpuload: fix cpuload error
Signed-off-by: ligd <li...@xiaomi.com>
---
sched/sched/sched_processtimer.c | 2 ++
sched/sched/sched_timerexpiration.c | 2 ++
2 files changed, 4 insertions(+)
diff --git a/sched/sched/sched_processtimer.c b/sched/sched/sched_processtimer.c
index 9f9c24f160..d141727dd1 100644
--- a/sched/sched/sched_processtimer.c
+++ b/sched/sched/sched_processtimer.c
@@ -225,11 +225,13 @@ void nxsched_process_timer(void)
clock_timer();
}
+#ifndef CONFIG_SCHED_CPULOAD_EXTCLK
/* Perform CPU load measurements (before any timer-initiated context
* switches can occur)
*/
nxsched_process_cpuload();
+#endif
/* Check if the currently executing task has exceeded its
* timeslice.
diff --git a/sched/sched/sched_timerexpiration.c b/sched/sched/sched_timerexpiration.c
index a6459ecf94..15dd733087 100644
--- a/sched/sched/sched_timerexpiration.c
+++ b/sched/sched/sched_timerexpiration.c
@@ -382,11 +382,13 @@ static unsigned int nxsched_timer_process(unsigned int ticks,
clock_update_wall_time();
#endif
+#ifndef CONFIG_SCHED_CPULOAD_EXTCLK
/* Perform CPU load measurements (before any timer-initiated context
* switches can occur)
*/
nxsched_process_cpuload_ticks(ticks);
+#endif
/* Process watchdogs */