diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-12-10 22:13:28 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-12-10 22:13:28 +0000 |
commit | 9dc2c8d16e3d54daeb394d71b2455da114bbd5c9 (patch) | |
tree | 7e70e439c02af44198c2c9d3f1d490e865ae2ab9 /cpukit/rtems/src/ratemonperiod.c | |
parent | 2008-12-09 Joel Sherrill <joel.sherrill@oarcorp.com> (diff) | |
download | rtems-9dc2c8d16e3d54daeb394d71b2455da114bbd5c9.tar.bz2 |
2008-12-10 Joel Sherrill <joel.sherrill@oarcorp.com>
* rtems/include/rtems/rtems/ratemon.h,
rtems/include/rtems/rtems/types.h, rtems/src/ratemongetstatistics.c,
rtems/src/ratemongetstatus.c, rtems/src/ratemonperiod.c,
rtems/src/ratemonreportstatistics.c,
score/include/rtems/score/thread.h, score/src/coretodgetuptime.c:
Make all Thread and Period Statistics use publicly defined types. Do
not leak the SuperCore Timestamp type through the APIs.
Diffstat (limited to 'cpukit/rtems/src/ratemonperiod.c')
-rw-r--r-- | cpukit/rtems/src/ratemonperiod.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/cpukit/rtems/src/ratemonperiod.c b/cpukit/rtems/src/ratemonperiod.c index db3b179e98..3c51ec72ef 100644 --- a/cpukit/rtems/src/ratemonperiod.c +++ b/cpukit/rtems/src/ratemonperiod.c @@ -27,15 +27,12 @@ void _Rate_monotonic_Update_statistics( Rate_monotonic_Control *the_period ) { - rtems_rate_monotonic_period_statistics *stats; - rtems_thread_cpu_usage_t executed; - rtems_rate_monotonic_period_time_t since_last_period; - #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS - rtems_rate_monotonic_period_time_t period_start; - #endif + Rate_monotonic_Statistics *stats; + Thread_CPU_usage_t executed; + Rate_monotonic_Period_time_t since_last_period; #if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS) || \ defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS) - Timestamp_Control uptime; + Timestamp_Control uptime; /* * Obtain the current time since boot @@ -54,8 +51,11 @@ void _Rate_monotonic_Update_statistics( */ #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS - period_start = the_period->time_at_period; - _Timestamp_Subtract( &period_start, &uptime, &since_last_period ); + _Timestamp_Subtract( + &the_period->time_at_period, + &uptime, + &since_last_period + ); the_period->time_at_period = uptime; #else since_last_period = _Watchdog_Ticks_since_boot - the_period->time_at_period; @@ -64,7 +64,7 @@ void _Rate_monotonic_Update_statistics( #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS { - rtems_thread_cpu_usage_t ran, used; + Thread_CPU_usage_t ran, used; /* Grab CPU usage when the thread got switched in */ used = _Thread_Executing->cpu_time_used; @@ -233,7 +233,7 @@ rtems_status_code rtems_rate_monotonic_period( #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS { - rtems_thread_cpu_usage_t ran; + Thread_CPU_usage_t ran; the_period->owner_executed_at_period = _Thread_Executing->cpu_time_used; |