summaryrefslogtreecommitdiffstats
path: root/cpukit/libmisc/cpuuse
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2008-08-18 21:16:42 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2008-08-18 21:16:42 +0000
commit1487880d2c5ca2b5054313b2c7bec0d3d48d334a (patch)
tree5df9322f0a1891a42ebb5c5f928d009ab36d7cfc /cpukit/libmisc/cpuuse
parent2008-08-18 Ralf Corsépius <ralf.corsepius@rtems.org> (diff)
downloadrtems-1487880d2c5ca2b5054313b2c7bec0d3d48d334a.tar.bz2
2008-08-18 Joel Sherrill <joel.sherrill@oarcorp.com>
* libcsupport/include/rtems/libcsupport.h, libcsupport/src/scandir.c, libmisc/cpuuse/cpuusagereset.c, libmisc/monitor/mon-monitor.c, libmisc/serdbg/serdbg.c, libmisc/serdbg/serdbg.h, libnetworking/netinet/in_cksum_powerpc.h, shttpd/compat_rtems.h: Fix warnings.
Diffstat (limited to 'cpukit/libmisc/cpuuse')
-rw-r--r--cpukit/libmisc/cpuuse/cpuusagereset.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/cpukit/libmisc/cpuuse/cpuusagereset.c b/cpukit/libmisc/cpuuse/cpuusagereset.c
index 167fe46868..b6920702e1 100644
--- a/cpukit/libmisc/cpuuse/cpuusagereset.c
+++ b/cpukit/libmisc/cpuuse/cpuusagereset.c
@@ -35,21 +35,26 @@ static void CPU_usage_Per_thread_handler(
#endif
}
+
+/*
+ * External data that is shared by cpu usage code but not declared in .h files.
+ */
+#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
+ extern struct timespec CPU_usage_Uptime_at_last_reset;
+#else
+ extern uint32_t CPU_usage_Ticks_at_last_reset;
+#endif
+
/*
* rtems_cpu_usage_reset
*/
void rtems_cpu_usage_reset( void )
{
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
- extern struct timespec CPU_usage_Uptime_at_last_reset;
-
_TOD_Get_uptime( &CPU_usage_Uptime_at_last_reset );
_Thread_Time_of_last_context_switch = CPU_usage_Uptime_at_last_reset;
#else
- extern uint32_t CPU_usage_Ticks_at_last_reset;
-
CPU_usage_Ticks_at_last_reset = _Watchdog_Ticks_since_boot;
-
#endif
rtems_iterate_over_all_threads(CPU_usage_Per_thread_handler);