[rtems commit] rtems: Delete Rate_monotonic_Period_time_t

Sebastian Huber sebh at rtems.org
Mon Mar 21 09:46:44 UTC 2016


Module:    rtems
Branch:    master
Commit:    300eaadd42f2d62c28a2b55c8363601d87cc2bb3
Changeset: http://git.rtems.org/rtems/commit/?id=300eaadd42f2d62c28a2b55c8363601d87cc2bb3

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Mon Mar 21 10:41:31 2016 +0100

rtems: Delete Rate_monotonic_Period_time_t

Variables with this type directly used the _Timestamp_*() functions.

---

 cpukit/rtems/include/rtems/rtems/ratemon.h     | 16 +++++++---------
 cpukit/rtems/include/rtems/rtems/ratemonimpl.h |  6 +++---
 cpukit/rtems/src/ratemongetstatus.c            | 10 +++++-----
 cpukit/rtems/src/ratemonperiod.c               | 14 +++++++-------
 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 267502e..0159e5c 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 46ca280..3141bfa 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 b70abef..29296eb 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 2a4b4eb..11968ad 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




More information about the vc mailing list