summaryrefslogtreecommitdiffstats
path: root/cpukit/libmisc/cpuuse/cpuusagereset.c
diff options
context:
space:
mode:
authorGlenn Humphrey <glenn.humphrey@oarcorp.com>2009-12-02 18:15:16 +0000
committerGlenn Humphrey <glenn.humphrey@oarcorp.com>2009-12-02 18:15:16 +0000
commitc6f7e060eaeb951a86dc640855e88c6f8260a347 (patch)
tree7d6ef3b0be5fec6206861601980974b5749baa04 /cpukit/libmisc/cpuuse/cpuusagereset.c
parent2009-12-02 Ralf Corsépius <ralf.corsepius@rtems.org> (diff)
downloadrtems-c6f7e060eaeb951a86dc640855e88c6f8260a347.tar.bz2
2009-12-02 Glenn Humphrey <glenn.humphrey@OARcorp.com>
* configure.ac, libcsupport/src/__times.c, libmisc/cpuuse/cpuusagedata.c, libmisc/cpuuse/cpuusagereport.c, libmisc/cpuuse/cpuusagereset.c, rtems/include/rtems/rtems/ratemon.h, rtems/include/rtems/rtems/types.h, rtems/src/ratemongetstatistics.c, rtems/src/ratemongetstatus.c, rtems/src/ratemonperiod.c, rtems/src/ratemonreportstatistics.c, score/include/rtems/score/thread.h, score/src/threaddispatch.c, score/src/threadinitialize.c, score/src/threadtickletimeslice.c: Changed the configuration of statistics granularity to use just one define.
Diffstat (limited to '')
-rw-r--r--cpukit/libmisc/cpuuse/cpuusagereset.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/cpukit/libmisc/cpuuse/cpuusagereset.c b/cpukit/libmisc/cpuuse/cpuusagereset.c
index 233631dda2..80c041e3fe 100644
--- a/cpukit/libmisc/cpuuse/cpuusagereset.c
+++ b/cpukit/libmisc/cpuuse/cpuusagereset.c
@@ -28,18 +28,17 @@ static void CPU_usage_Per_thread_handler(
Thread_Control *the_thread
)
{
- #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
+ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Set_to_zero( &the_thread->cpu_time_used );
#else
the_thread->cpu_time_used = 0;
#endif
}
-
/*
* External data that is shared by cpu usage code but not declared in .h files.
*/
-#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
+#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
extern Timestamp_Control CPU_usage_Uptime_at_last_reset;
#else
extern uint32_t CPU_usage_Ticks_at_last_reset;
@@ -50,7 +49,7 @@ static void CPU_usage_Per_thread_handler(
*/
void rtems_cpu_usage_reset( void )
{
- #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
+ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_TOD_Get_uptime( &CPU_usage_Uptime_at_last_reset );
_Thread_Time_of_last_context_switch = CPU_usage_Uptime_at_last_reset;
#else