summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-03-21 10:41:31 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-03-21 10:44:35 +0100
commit300eaadd42f2d62c28a2b55c8363601d87cc2bb3 (patch)
tree378fde5cdeade74ac0998f91d8a170e3399cf109
parentrtems: Inline _Rate_monotonic_Reset_statistics() (diff)
downloadrtems-300eaadd42f2d62c28a2b55c8363601d87cc2bb3.tar.bz2
rtems: Delete Rate_monotonic_Period_time_t
Variables with this type directly used the _Timestamp_*() functions.
-rw-r--r--cpukit/rtems/include/rtems/rtems/ratemon.h16
-rw-r--r--cpukit/rtems/include/rtems/rtems/ratemonimpl.h6
-rw-r--r--cpukit/rtems/src/ratemongetstatus.c10
-rw-r--r--cpukit/rtems/src/ratemonperiod.c14
4 files changed, 22 insertions, 24 deletions
diff --git a/cpukit/rtems/include/rtems/rtems/ratemon.h b/cpukit/rtems/include/rtems/rtems/ratemon.h
index 267502e940..0159e5c1e6 100644
--- a/cpukit/rtems/include/rtems/rtems/ratemon.h
+++ b/cpukit/rtems/include/rtems/rtems/ratemon.h
@@ -71,8 +71,6 @@ typedef struct timespec rtems_rate_monotonic_period_time_t;
*/
#include <rtems/score/timestamp.h>
-typedef Timestamp_Control Rate_monotonic_Period_time_t;
-
/**
* The following enumerated type defines the states in which a
* period may be.
@@ -156,18 +154,18 @@ typedef struct {
uint32_t missed_count;
/** This field contains the least amount of CPU time used in a period. */
- Timestamp_Control min_cpu_time;
+ Timestamp_Control min_cpu_time;
/** This field contains the highest amount of CPU time used in a period. */
- Timestamp_Control max_cpu_time;
+ Timestamp_Control max_cpu_time;
/** This field contains the total amount of wall time used in a period. */
- Timestamp_Control total_cpu_time;
+ Timestamp_Control total_cpu_time;
/** This field contains the least amount of wall time used in a period. */
- Rate_monotonic_Period_time_t min_wall_time;
+ Timestamp_Control min_wall_time;
/** This field contains the highest amount of wall time used in a period. */
- Rate_monotonic_Period_time_t max_wall_time;
+ Timestamp_Control max_wall_time;
/** This field contains the total amount of CPU time used in a period. */
- Rate_monotonic_Period_time_t total_wall_time;
+ Timestamp_Control total_wall_time;
} Rate_monotonic_Statistics;
/**
@@ -232,7 +230,7 @@ typedef struct {
* This field contains the wall time value when the period
* was initiated. It is used to compute the period's statistics.
*/
- Rate_monotonic_Period_time_t time_period_initiated;
+ Timestamp_Control time_period_initiated;
/**
* This field contains the statistics maintained for the period.
diff --git a/cpukit/rtems/include/rtems/rtems/ratemonimpl.h b/cpukit/rtems/include/rtems/rtems/ratemonimpl.h
index 46ca2809d5..3141bfa9ae 100644
--- a/cpukit/rtems/include/rtems/rtems/ratemonimpl.h
+++ b/cpukit/rtems/include/rtems/rtems/ratemonimpl.h
@@ -153,9 +153,9 @@ void _Rate_monotonic_Timeout( Watchdog_Control *watchdog );
* and false otherwise.
*/
bool _Rate_monotonic_Get_status(
- Rate_monotonic_Control *the_period,
- Rate_monotonic_Period_time_t *wall_since_last_period,
- Timestamp_Control *cpu_since_last_period
+ const Rate_monotonic_Control *the_period,
+ Timestamp_Control *wall_since_last_period,
+ Timestamp_Control *cpu_since_last_period
);
/**
diff --git a/cpukit/rtems/src/ratemongetstatus.c b/cpukit/rtems/src/ratemongetstatus.c
index b70abefd74..29296ebca3 100644
--- a/cpukit/rtems/src/ratemongetstatus.c
+++ b/cpukit/rtems/src/ratemongetstatus.c
@@ -31,11 +31,11 @@ rtems_status_code rtems_rate_monotonic_get_status(
rtems_rate_monotonic_period_status *status
)
{
- Timestamp_Control executed;
- Objects_Locations location;
- Rate_monotonic_Period_time_t since_last_period;
- Rate_monotonic_Control *the_period;
- bool valid_status;
+ Timestamp_Control executed;
+ Objects_Locations location;
+ Timestamp_Control since_last_period;
+ Rate_monotonic_Control *the_period;
+ bool valid_status;
if ( !status )
return RTEMS_INVALID_ADDRESS;
diff --git a/cpukit/rtems/src/ratemonperiod.c b/cpukit/rtems/src/ratemonperiod.c
index 2a4b4ebde2..11968adc27 100644
--- a/cpukit/rtems/src/ratemonperiod.c
+++ b/cpukit/rtems/src/ratemonperiod.c
@@ -25,9 +25,9 @@
#include <rtems/score/watchdogimpl.h>
bool _Rate_monotonic_Get_status(
- Rate_monotonic_Control *the_period,
- Rate_monotonic_Period_time_t *wall_since_last_period,
- Timestamp_Control *cpu_since_last_period
+ const Rate_monotonic_Control *the_period,
+ Timestamp_Control *wall_since_last_period,
+ Timestamp_Control *cpu_since_last_period
)
{
Timestamp_Control uptime;
@@ -92,10 +92,10 @@ static void _Rate_monotonic_Update_statistics(
Rate_monotonic_Control *the_period
)
{
- Timestamp_Control executed;
- Rate_monotonic_Period_time_t since_last_period;
- Rate_monotonic_Statistics *stats;
- bool valid_status;
+ Timestamp_Control executed;
+ Timestamp_Control since_last_period;
+ Rate_monotonic_Statistics *stats;
+ bool valid_status;
/*
* Assume we are only called in states where it is appropriate