summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include/rtems/score/thread.h
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2008-06-06 15:44:11 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2008-06-06 15:44:11 +0000
commit5fa51853245aefdbc5827cb819359afe8f6e06ff (patch)
treea78d310dc6c0758bb53dd0222261660593278e3a /cpukit/score/include/rtems/score/thread.h
parent2008-06-05 Joel Sherrill <joel.sherrill@OARcorp.com> (diff)
downloadrtems-5fa51853245aefdbc5827cb819359afe8f6e06ff.tar.bz2
2008-06-06 Joel Sherrill <joel.sherrill@OARcorp.com>
* libcsupport/src/__times.c, libmisc/cpuuse/cpuusagereport.c, libmisc/cpuuse/cpuusagereset.c, libmisc/monitor/mon-task.c, rtems/include/rtems/rtems/ratemon.h, rtems/src/ratemongetstatus.c, rtems/src/ratemonperiod.c, score/include/rtems/score/thread.h, score/src/threaddispatch.c, score/src/threadinitialize.c, score/src/threadtickletimeslice.c: Add typedefs for cpu usage and period timing statistics. Also renamed related variables and structure members so they are the same whether you are using nanosecond (e.g. struct timespec) or ticks (e.g. uint32_t) granularity. This lays the groundwork for future cleanup.
Diffstat (limited to 'cpukit/score/include/rtems/score/thread.h')
-rw-r--r--cpukit/score/include/rtems/score/thread.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/cpukit/score/include/rtems/score/thread.h b/cpukit/score/include/rtems/score/thread.h
index a767fe09fe..b863a1f111 100644
--- a/cpukit/score/include/rtems/score/thread.h
+++ b/cpukit/score/include/rtems/score/thread.h
@@ -43,6 +43,11 @@ extern "C" {
* is used.
*/
#define RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
+
+ #define RTEMS_CPU_USAGE_STATISTICS_TIME_TYPE struct timespec
+
+#else
+ #define RTEMS_CPU_USAGE_STATISTICS_TIME_TYPE uint32_t
#endif
#include <rtems/score/context.h>
@@ -344,11 +349,7 @@ struct Thread_Control_struct {
/** This field is the amount of CPU time consumed by this thread
* since it was created.
*/
- #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
- struct timespec cpu_time_used;
- #else
- uint32_t ticks_executed;
- #endif
+ RTEMS_CPU_USAGE_STATISTICS_TIME_TYPE cpu_time_used;
/** This field points to the Ready FIFO for this priority. */
Chain_Control *ready;
/** This field contains precalculated priority map indices. */