summaryrefslogtreecommitdiffstats
path: root/cpukit/libmisc/cpuuse/cpuusagereport.c
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/cpuusagereport.c
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/cpuusagereport.c')
-rw-r--r--cpukit/libmisc/cpuuse/cpuusagereport.c6
1 files changed, 3 insertions, 3 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
);