From 5fa51853245aefdbc5827cb819359afe8f6e06ff Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 6 Jun 2008 15:44:11 +0000 Subject: 2008-06-06 Joel Sherrill * 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. --- cpukit/rtems/src/ratemongetstatus.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'cpukit/rtems/src/ratemongetstatus.c') diff --git a/cpukit/rtems/src/ratemongetstatus.c b/cpukit/rtems/src/ratemongetstatus.c index 5ea67f38e7..ef47a032e5 100644 --- a/cpukit/rtems/src/ratemongetstatus.c +++ b/cpukit/rtems/src/ratemongetstatus.c @@ -68,13 +68,13 @@ rtems_status_code rtems_rate_monotonic_get_status( status->since_last_period.tv_sec = 0; status->since_last_period.tv_nsec = 0; #else - status->ticks_since_last_period = 0; + status->since_last_period = 0; #endif #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS status->executed_since_last_period.tv_sec = 0; status->executed_since_last_period.tv_nsec = 0; #else - status->ticks_executed_since_last_period = 0; + status->executed_since_last_period = 0; #endif } else { /* @@ -94,7 +94,7 @@ rtems_status_code rtems_rate_monotonic_get_status( &status->since_last_period ); #else - status->ticks_since_last_period = + status->since_last_period = _Watchdog_Ticks_since_boot - the_period->time_at_period; #endif @@ -105,9 +105,9 @@ rtems_status_code rtems_rate_monotonic_get_status( &status->executed_since_last_period ); #else - status->ticks_executed_since_last_period = - the_period->owner->ticks_executed - - the_period->owner_ticks_executed_at_period; + status->executed_since_last_period = + the_period->owner->cpu_time_used - + the_period->owner_executed_at_period; #endif } -- cgit v1.2.3