diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-04-30 15:47:55 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-04-30 15:47:55 -0600 |
commit | 105b3699b86776e0aecc57aa69dcb6dd7f2a69a7 (patch) | |
tree | 6802c730fa4878356f012f59f318952f15ac22a8 | |
parent | 369dd7d095d1ad14ef0c6bf2e23dbef1d63913c2 (diff) | |
download | nuttx-105b3699b86776e0aecc57aa69dcb6dd7f2a69a7.tar.gz nuttx-105b3699b86776e0aecc57aa69dcb6dd7f2a69a7.tar.bz2 nuttx-105b3699b86776e0aecc57aa69dcb6dd7f2a69a7.zip |
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
-rw-r--r-- | nuttx/ChangeLog | 4 | ||||
-rwxr-xr-x | nuttx/configs/sam4s-xplained-pro/src/sam_tc.c | 1 | ||||
-rw-r--r-- | nuttx/include/nuttx/arch.h | 22 | ||||
-rw-r--r-- | nuttx/sched/os_internal.h | 2 |
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); |