summaryrefslogtreecommitdiffstats
path: root/cpukit/libmisc/cpuuse
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/libmisc/cpuuse
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/libmisc/cpuuse')
-rw-r--r--cpukit/libmisc/cpuuse/cpuusagereport.c6
-rw-r--r--cpukit/libmisc/cpuuse/cpuusagereset.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/cpukit/libmisc/cpuuse/cpuusagereport.c b/cpukit/libmisc/cpuuse/cpuusagereport.c
index bdf8f81f5d..144be50645 100644
--- a/cpukit/libmisc/cpuuse/cpuusagereport.c
+++ b/cpukit/libmisc/cpuuse/cpuusagereport.c
@@ -80,7 +80,7 @@ void rtems_cpu_usage_report_with_plugin(
the_thread = (Thread_Control *)information->local_table[ i ];
if ( the_thread )
- total_units += the_thread->ticks_executed;
+ total_units += the_thread->cpu_time_used;
}
}
}
@@ -142,12 +142,12 @@ void rtems_cpu_usage_report_with_plugin(
);
#else
ival = (total_units) ?
- the_thread->ticks_executed * 10000 / total_units : 0;
+ the_thread->cpu_time_used * 10000 / total_units : 0;
fval = ival % 100;
ival /= 100;
(*print)( context,
"%8" PRId32 " %3" PRId32 ".%02" PRId32"\n",
- the_thread->ticks_executed,
+ the_thread->cpu_time_used,
ival,
fval
);
diff --git a/cpukit/libmisc/cpuuse/cpuusagereset.c b/cpukit/libmisc/cpuuse/cpuusagereset.c
index 3acfd2c452..167fe46868 100644
--- a/cpukit/libmisc/cpuuse/cpuusagereset.c
+++ b/cpukit/libmisc/cpuuse/cpuusagereset.c
@@ -31,7 +31,7 @@ static void CPU_usage_Per_thread_handler(
the_thread->cpu_time_used.tv_sec = 0;
the_thread->cpu_time_used.tv_nsec = 0;
#else
- the_thread->ticks_executed = 0;
+ the_thread->cpu_time_used = 0;
#endif
}