summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nuttx/ChangeLog4
-rwxr-xr-xnuttx/configs/sam4s-xplained-pro/src/sam_tc.c1
-rw-r--r--nuttx/include/nuttx/arch.h22
-rw-r--r--nuttx/sched/os_internal.h2
4 files changed, 28 insertions, 1 deletions
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog
index f7d4d0c5f..221bfe712 100644
--- a/nuttx/ChangeLog
+++ b/nuttx/ChangeLog
@@ -7275,3 +7275,7 @@
* configs/sam4s-xplained-pro/Kconfig, nsh/defconfig, and src/sam_tc.c:
The SAM4S Xplained Pro now uses the extended timer/counter features.
From Bob Doiron (2014-4-30).
+ * include/nuttx/arch.h and sched/os_internal.h: If the CPU load
+ measurements are being driven by an external clock, then the prototype
+ for sched_process_cpuload() must be available in include/nuttx/arch.h
+ (2014-4-30).
diff --git a/nuttx/configs/sam4s-xplained-pro/src/sam_tc.c b/nuttx/configs/sam4s-xplained-pro/src/sam_tc.c
index fb0a1990c..c2ba12e4e 100755
--- a/nuttx/configs/sam4s-xplained-pro/src/sam_tc.c
+++ b/nuttx/configs/sam4s-xplained-pro/src/sam_tc.c
@@ -48,6 +48,7 @@
#include <stdio.h>
#include <fcntl.h>
+#include <nuttx/arch.h>
#include <nuttx/timer.h>
#include <nuttx/clock.h>
#include <nuttx/kthread.h>
diff --git a/nuttx/include/nuttx/arch.h b/nuttx/include/nuttx/arch.h
index d8bb76992..74dcdc81f 100644
--- a/nuttx/include/nuttx/arch.h
+++ b/nuttx/include/nuttx/arch.h
@@ -1029,6 +1029,28 @@ void up_cxxinitialize(void);
void sched_process_timer(void);
+/************************************************************************
+ * Name: sched_process_cpuload
+ *
+ * Description:
+ * Collect data that can be used for CPU load measurements.
+ *
+ * Inputs:
+ * None
+ *
+ * Return 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/nuttx/sched/os_internal.h b/nuttx/sched/os_internal.h
index 662b42e51..3e292e58b 100644
--- a/nuttx/sched/os_internal.h
+++ b/nuttx/sched/os_internal.h
@@ -255,7 +255,7 @@ int sched_reprioritize(FAR struct tcb_s *tcb, int sched_priority);
#else
# define sched_reprioritize(tcb,sched_priority) sched_setpriority(tcb,sched_priority)
#endif
-#ifdef CONFIG_SCHED_CPULOAD
+#if defined(CONFIG_SCHED_CPULOAD) && !defined(CONFIG_SCHED_CPULOAD_EXTCLK)
void weak_function sched_process_cpuload(void);
#endif
bool sched_verifytcb(FAR struct tcb_s *tcb);