diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2007-09-06 22:09:18 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2007-09-06 22:09:18 +0000 |
commit | 8677cf75e577ce98a3e72087dcbdda0c83a0330c (patch) | |
tree | b74f7e170cd60b8172f85fdc5771dae647d18e60 /cpukit/rtems/src/ratemonperiod.c | |
parent | 2007-09-06 Daniel Hellstrom <daniel@gaisler.com> (diff) | |
download | rtems-8677cf75e577ce98a3e72087dcbdda0c83a0330c.tar.bz2 |
2007-09-06 Joel Sherrill <joel.sherrill@oarcorp.com>
* rtems/src/ratemonperiod.c: Clean up.
* rtems/src/ratemonreportstatistics.c: Clarify period statistics output.
Diffstat (limited to 'cpukit/rtems/src/ratemonperiod.c')
-rw-r--r-- | cpukit/rtems/src/ratemonperiod.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/cpukit/rtems/src/ratemonperiod.c b/cpukit/rtems/src/ratemonperiod.c index 50a0a2d912..8d0dca13d2 100644 --- a/cpukit/rtems/src/ratemonperiod.c +++ b/cpukit/rtems/src/ratemonperiod.c @@ -66,8 +66,8 @@ void _Rate_monotonic_Update_statistics( #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS period_start = the_period->time_at_period; - the_period->time_at_period = uptime; _Timespec_Subtract( &period_start, &uptime, &since_last_period ); + the_period->time_at_period = uptime; #else ticks_since_last_period = _Watchdog_Ticks_since_boot - the_period->time_at_period; @@ -122,7 +122,6 @@ void _Rate_monotonic_Update_statistics( if ( _Timespec_Greater_than( &executed, &stats->max_cpu_time ) ) stats->max_cpu_time = executed; - #else stats->total_cpu_time += ticks_executed_since_last_period; @@ -148,10 +147,10 @@ void _Rate_monotonic_Update_statistics( #else _Timespec_Add_to( &stats->total_wall_time, &since_last_period ); - if ( _Timespec_Less_than( &since_last_period, &stats->min_wall_time ) ) + if ( _Timespec_Less_than( &since_last_period, &stats->min_wall_time ) ) stats->min_wall_time = since_last_period; - if ( _Timespec_Greater_than( &since_last_period, &stats->max_wall_time ) ) + if ( _Timespec_Greater_than( &since_last_period, &stats->max_wall_time ) ) stats->max_wall_time = since_last_period; #endif } @@ -260,7 +259,10 @@ rtems_status_code rtems_rate_monotonic_period( &ran ); - /* thread had executed before the last context switch also */ + /* The thread had executed before the last context switch also. + * + * the_period->owner_executed_at_period += ran + */ _Timespec_Add_to( &the_period->owner_executed_at_period, &ran ); } #else |