summaryrefslogtreecommitdiffstats
path: root/cpukit/score
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/score
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 'cpukit/score')
-rw-r--r--cpukit/score/include/rtems/score/thread.h16
-rw-r--r--cpukit/score/src/threaddispatch.c4
-rw-r--r--cpukit/score/src/threadinitialize.c4
-rw-r--r--cpukit/score/src/threadtickletimeslice.c2
4 files changed, 7 insertions, 19 deletions
diff --git a/cpukit/score/include/rtems/score/thread.h b/cpukit/score/include/rtems/score/thread.h
index 9e09efc950..214f8ce1f5 100644
--- a/cpukit/score/include/rtems/score/thread.h
+++ b/cpukit/score/include/rtems/score/thread.h
@@ -47,17 +47,9 @@ extern "C" {
* The user can define this at configure time and go back to ticks
* resolution.
*/
-#ifndef __RTEMS_USE_TICKS_CPU_USAGE_STATISTICS__
+#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
#include <rtems/score/timestamp.h>
- /**
- * This macro enables the nanosecond accurate statistics
- *
- * When not defined, the older style tick accurate granularity
- * is used.
- */
- #define RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
-
typedef Timestamp_Control Thread_CPU_usage_t;
#else
typedef uint32_t Thread_CPU_usage_t;
@@ -76,10 +68,6 @@ extern "C" {
#include <rtems/score/tqdata.h>
#include <rtems/score/watchdog.h>
-#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
- /* XXX include something for timespec */
-#endif
-
/**
* The following defines the "return type" of a thread.
*
@@ -516,7 +504,7 @@ SCORE_EXTERN Thread_Control *_Thread_Allocated_fp;
*/
SCORE_EXTERN struct _reent **_Thread_libc_reent;
-#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
+#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
/**
* This contains the time since boot when the last context switch occurred.
diff --git a/cpukit/score/src/threaddispatch.c b/cpukit/score/src/threaddispatch.c
index e3c0ded97d..58a303a503 100644
--- a/cpukit/score/src/threaddispatch.c
+++ b/cpukit/score/src/threaddispatch.c
@@ -30,7 +30,7 @@
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
-#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
+#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
#include <rtems/score/timestamp.h>
#endif
@@ -102,7 +102,7 @@ void _Thread_Dispatch( void )
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
_ISR_Enable( level );
- #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
+ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
diff --git a/cpukit/score/src/threadinitialize.c b/cpukit/score/src/threadinitialize.c
index fe9a5c3dea..671354ed88 100644
--- a/cpukit/score/src/threadinitialize.c
+++ b/cpukit/score/src/threadinitialize.c
@@ -200,10 +200,10 @@ bool _Thread_Initialize(
/*
* Initialize the CPU usage statistics
*/
- #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;
+ the_thread->cpu_time_used = 0;
#endif
/*
diff --git a/cpukit/score/src/threadtickletimeslice.c b/cpukit/score/src/threadtickletimeslice.c
index ab6469b3c3..76324fc13e 100644
--- a/cpukit/score/src/threadtickletimeslice.c
+++ b/cpukit/score/src/threadtickletimeslice.c
@@ -49,7 +49,7 @@ void _Thread_Tickle_timeslice( void )
executing = _Thread_Executing;
- #ifndef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
+ #ifdef __RTEMS_USE_TICKS_FOR_STATISTICS__
/*
* Increment the number of ticks this thread has been executing
*/