[PATCH 2/3] ada: Update due to Clock Manager API changes

Sebastian Huber sebastian.huber at embedded-brains.de
Tue May 23 09:35:18 UTC 2017


Update #2676.
---
 c/src/ada-tests/sptests/sp09/sptest.adb          |  4 ++--
 c/src/ada-tests/sptests/sp20/sptest.adb          |  3 +--
 c/src/ada-tests/tmtests/tmoverhd/dummy_rtems.adb |  2 +-
 c/src/ada-tests/tmtests/tmoverhd/dummy_rtems.ads |  2 +-
 c/src/ada-tests/tmtests/tmoverhd/tmtest.adb      |  1 -
 c/src/ada/rtems-clock.adb                        | 15 +++++++++++++++
 c/src/ada/rtems-clock.ads                        |  5 -----
 7 files changed, 20 insertions(+), 12 deletions(-)

diff --git a/c/src/ada-tests/sptests/sp09/sptest.adb b/c/src/ada-tests/sptests/sp09/sptest.adb
index 49d696b4de..218fbaed49 100644
--- a/c/src/ada-tests/sptests/sp09/sptest.adb
+++ b/c/src/ada-tests/sptests/sp09/sptest.adb
@@ -2782,7 +2782,7 @@ package body SPTEST is
       );
       TEXT_IO.NEW_LINE;
 
-      RTEMS.CLOCK.GET( RTEMS.CLOCK.GET_TOD, TIME'ADDRESS, STATUS );
+      RTEMS.CLOCK.GET_TOD( TIME, STATUS );
       TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "CLOCK_GET SUCCESSFUL" );
       TEST_SUPPORT.PRINT_TIME( "TA1 - clock_get       - ", TIME, "" );
       TEXT_IO.NEW_LINE;
@@ -2906,7 +2906,7 @@ package body SPTEST is
       );
       TEXT_IO.NEW_LINE;
 
-      RTEMS.CLOCK.GET( RTEMS.CLOCK.GET_TOD, TIME'ADDRESS, STATUS );
+      RTEMS.CLOCK.GET_TOD( TIME, STATUS );
       TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "clock_set" );
       TEST_SUPPORT.PRINT_TIME( "TA1 - clock_get       - ", TIME, "" );
       TEXT_IO.NEW_LINE;
diff --git a/c/src/ada-tests/sptests/sp20/sptest.adb b/c/src/ada-tests/sptests/sp20/sptest.adb
index 8acb6c76dc..1929fd958f 100644
--- a/c/src/ada-tests/sptests/sp20/sptest.adb
+++ b/c/src/ada-tests/sptests/sp20/sptest.adb
@@ -241,8 +241,7 @@ package body SPTEST is
                );
 
                -- timestamp
-               RTEMS.CLOCK.GET_TICKS_SINCE_BOOT( Time( INDEX ), STATUS );
-               TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "clock_get of TA6" );
+               Time( INDEX ) := RTEMS.CLOCK.GET_TICKS_SINCE_BOOT;
             end loop;
 
             for INDEX in 1 .. 10 loop
diff --git a/c/src/ada-tests/tmtests/tmoverhd/dummy_rtems.adb b/c/src/ada-tests/tmtests/tmoverhd/dummy_rtems.adb
index 64fd09d0c7..62986dc465 100644
--- a/c/src/ada-tests/tmtests/tmoverhd/dummy_rtems.adb
+++ b/c/src/ada-tests/tmtests/tmoverhd/dummy_rtems.adb
@@ -190,7 +190,7 @@ package body DUMMY_RTEMS is
 -- Clock Manager
 
    procedure CLOCK_GET_TOD (
-      TIME_BUFFER :    out RTEMS.ADDRESS;
+      TIME_BUFFER :    out RTEMS.TIME_OF_DAY;
       RESULT      :    out RTEMS.STATUS_CODES
    ) is
       pragma Unreferenced(TIME_BUFFER);
diff --git a/c/src/ada-tests/tmtests/tmoverhd/dummy_rtems.ads b/c/src/ada-tests/tmtests/tmoverhd/dummy_rtems.ads
index da7f0773b9..ea4f129893 100644
--- a/c/src/ada-tests/tmtests/tmoverhd/dummy_rtems.ads
+++ b/c/src/ada-tests/tmtests/tmoverhd/dummy_rtems.ads
@@ -109,7 +109,7 @@ package DUMMY_RTEMS is
 -- Clock Manager
 
    procedure CLOCK_GET_TOD (
-      TIME_BUFFER :    out RTEMS.ADDRESS;
+      TIME_BUFFER :    out RTEMS.TIME_OF_DAY;
       RESULT      :    out RTEMS.STATUS_CODES
    );
 
diff --git a/c/src/ada-tests/tmtests/tmoverhd/tmtest.adb b/c/src/ada-tests/tmtests/tmoverhd/tmtest.adb
index ce5b7a37b9..58c5ad09c6 100644
--- a/c/src/ada-tests/tmtests/tmoverhd/tmtest.adb
+++ b/c/src/ada-tests/tmtests/tmoverhd/tmtest.adb
@@ -23,7 +23,6 @@ with TEST_SUPPORT;
 with TEXT_IO;
 with TIME_TEST_SUPPORT;
 with TIMER_DRIVER;
-with RTEMS.CLOCK;
 
 package body TMTEST is
 
diff --git a/c/src/ada/rtems-clock.adb b/c/src/ada/rtems-clock.adb
index 6f85d4aefc..d6f596a5d5 100644
--- a/c/src/ada/rtems-clock.adb
+++ b/c/src/ada/rtems-clock.adb
@@ -122,4 +122,19 @@ package body RTEMS.Clock is
 
    end Tick;
 
+   function Get_Ticks_Since_Boot
+      return RTEMS.Interval
+   is
+      Watchdog_Ticks_since_boot : RTEMS.Interval;
+      pragma Import (
+         C,
+         Watchdog_Ticks_since_boot,
+         "_Watchdog_Ticks_since_boot"
+      );
+   begin
+
+      return Watchdog_Ticks_since_boot;
+
+   end Get_Ticks_Since_Boot;
+
 end RTEMS.Clock;
diff --git a/c/src/ada/rtems-clock.ads b/c/src/ada/rtems-clock.ads
index 36ccfba2d4..12afb42454 100644
--- a/c/src/ada/rtems-clock.ads
+++ b/c/src/ada/rtems-clock.ads
@@ -66,11 +66,6 @@ package RTEMS.Clock is
 
    function Get_Ticks_Since_Boot
    return RTEMS.Interval;
-   pragma Import (
-      C,
-      Get_Ticks_Since_Boot,
-      "rtems_clock_get_ticks_since_boot"
-   );
 
    procedure Get_Uptime (
       Uptime :    out RTEMS.Timespec;
-- 
2.12.0




More information about the devel mailing list