diff options
-rw-r--r-- | cpukit/ChangeLog | 6 | ||||
-rw-r--r-- | cpukit/rtems/include/rtems/rtems/ratemon.h | 11 | ||||
-rw-r--r-- | cpukit/rtems/src/ratemonperiod.c | 8 | ||||
-rw-r--r-- | cpukit/score/include/rtems/score/thread.h | 6 |
4 files changed, 19 insertions, 12 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index db28f5ac47..fcc445018d 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,5 +1,11 @@ 2008-06-06 Joel Sherrill <joel.sherrill@OARcorp.com> + * rtems/include/rtems/rtems/ratemon.h, rtems/src/ratemonperiod.c, + score/include/rtems/score/thread.h: Complete previous patch. Add + typedef for cpu usage statistics. + +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, diff --git a/cpukit/rtems/include/rtems/rtems/ratemon.h b/cpukit/rtems/include/rtems/rtems/ratemon.h index 3f990f28bd..cccf40dd9f 100644 --- a/cpukit/rtems/include/rtems/rtems/ratemon.h +++ b/cpukit/rtems/include/rtems/rtems/ratemon.h @@ -104,9 +104,10 @@ typedef enum { typedef struct { uint32_t count; uint32_t missed_count; - RTEMS_CPU_USAGE_STATISTICS_TIME_TYPE min_cpu_time; - RTEMS_CPU_USAGE_STATISTICS_TIME_TYPE max_cpu_time; - RTEMS_CPU_USAGE_STATISTICS_TIME_TYPE total_cpu_time; + + rtems_thread_cpu_usage_t min_cpu_time; + rtems_thread_cpu_usage_t max_cpu_time; + rtems_thread_cpu_usage_t total_cpu_time; rtems_rate_monotonic_period_time_t min_wall_time; rtems_rate_monotonic_period_time_t max_wall_time; @@ -120,7 +121,7 @@ typedef struct { Objects_Id owner; rtems_rate_monotonic_period_states state; rtems_rate_monotonic_period_time_t since_last_period; - RTEMS_CPU_USAGE_STATISTICS_TIME_TYPE executed_since_last_period; + rtems_thread_cpu_usage_t executed_since_last_period; } rtems_rate_monotonic_period_status; /** @@ -131,7 +132,7 @@ typedef struct { Objects_Control Object; Watchdog_Control Timer; rtems_rate_monotonic_period_states state; - RTEMS_CPU_USAGE_STATISTICS_TIME_TYPE owner_executed_at_period; + rtems_thread_cpu_usage_t owner_executed_at_period; rtems_rate_monotonic_period_time_t time_at_period; uint32_t next_length; Thread_Control *owner; diff --git a/cpukit/rtems/src/ratemonperiod.c b/cpukit/rtems/src/ratemonperiod.c index 3777b5ed76..5c9dfaed49 100644 --- a/cpukit/rtems/src/ratemonperiod.c +++ b/cpukit/rtems/src/ratemonperiod.c @@ -33,10 +33,10 @@ void _Rate_monotonic_Update_statistics( ) { rtems_rate_monotonic_period_statistics *stats; - RTEMS_CPU_USAGE_STATISTICS_TIME_TYPE executed; - rtems_rate_monotonic_period_time_t since_last_period; + 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; + rtems_rate_monotonic_period_time_t period_start; #endif #if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS) || \ defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS) @@ -234,7 +234,7 @@ rtems_status_code rtems_rate_monotonic_period( #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS { - RTEMS_CPU_USAGE_STATISTICS_TIME_TYPE ran; + rtems_thread_cpu_usage_t ran; the_period->owner_executed_at_period = _Thread_Executing->cpu_time_used; diff --git a/cpukit/score/include/rtems/score/thread.h b/cpukit/score/include/rtems/score/thread.h index b863a1f111..fcfac01026 100644 --- a/cpukit/score/include/rtems/score/thread.h +++ b/cpukit/score/include/rtems/score/thread.h @@ -44,10 +44,10 @@ extern "C" { */ #define RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS - #define RTEMS_CPU_USAGE_STATISTICS_TIME_TYPE struct timespec + typedef struct timespec rtems_thread_cpu_usage_t; #else - #define RTEMS_CPU_USAGE_STATISTICS_TIME_TYPE uint32_t + typedef uint32_t rtems_thread_cpu_usage_t; #endif #include <rtems/score/context.h> @@ -349,7 +349,7 @@ struct Thread_Control_struct { /** This field is the amount of CPU time consumed by this thread * since it was created. */ - RTEMS_CPU_USAGE_STATISTICS_TIME_TYPE cpu_time_used; + rtems_thread_cpu_usage_t cpu_time_used; /** This field points to the Ready FIFO for this priority. */ Chain_Control *ready; /** This field contains precalculated priority map indices. */ |