[PATCH 15/19] sptests misc: Update to not use deprecated methods

Joel Sherrill joel.sherrill at oarcorp.com
Mon Mar 16 20:29:32 UTC 2015


---
 testsuites/sptests/spcbssched02/task_periodic.c   | 6 +++---
 testsuites/sptests/spcbssched03/tasks_aperiodic.c | 6 +++---
 testsuites/sptests/spcbssched03/tasks_periodic.c  | 6 +++---
 testsuites/sptests/spedfsched03/tasks_aperiodic.c | 6 +++---
 testsuites/sptests/spedfsched03/tasks_periodic.c  | 6 +++---
 testsuites/sptests/spqreslib/task_periodic.c      | 6 +++---
 6 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/testsuites/sptests/spcbssched02/task_periodic.c b/testsuites/sptests/spcbssched02/task_periodic.c
index bcdec3c..4c11ad4 100644
--- a/testsuites/sptests/spcbssched02/task_periodic.c
+++ b/testsuites/sptests/spcbssched02/task_periodic.c
@@ -107,12 +107,12 @@ rtems_task Task_Periodic(
     if ( rtems_rate_monotonic_period(rmid, Period) == RTEMS_TIMEOUT )
       printf( "P%" PRIdPTR " - Deadline miss\n", argument );
 
-    rtems_clock_get( RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &start );
+    start = rtems_clock_get_ticks_since_boot();
     printf( "P%" PRIdPTR "-S ticks:%d\n", argument, start );
     if ( start > 4*Period+Phase ) break; /* stop */
     /* active computing */
     while(FOREVER) {
-      rtems_clock_get( RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now );
+      now = rtems_clock_get_ticks_since_boot();
       if ( now >= start + Execution ) break;
 
       if ( server_id != 0 ) {
@@ -126,7 +126,7 @@ rtems_task Task_Periodic(
         }
       }
     }
-    rtems_clock_get( RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &stop );
+    stop = rtems_clock_get_ticks_since_boot();
     printf( "P%" PRIdPTR "-F ticks:%d\n", argument, stop );
   }
 
diff --git a/testsuites/sptests/spcbssched03/tasks_aperiodic.c b/testsuites/sptests/spcbssched03/tasks_aperiodic.c
index 90684b4..efb6dce 100644
--- a/testsuites/sptests/spcbssched03/tasks_aperiodic.c
+++ b/testsuites/sptests/spcbssched03/tasks_aperiodic.c
@@ -31,15 +31,15 @@ rtems_task Tasks_Aperiodic(
   status = rtems_task_wake_after( 2 + Phases[argument] );
   directive_failed( status, "rtems_task_wake_after" );
 
-  rtems_clock_get(RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &start);
+  start = rtems_clock_get_ticks_since_boot();
   printf("AT%" PRIdPTR "-S ticks:%d\n", argument, start);
   /* active computing */
 
   while(FOREVER) {
-    rtems_clock_get(RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now);
+    now = rtems_clock_get_ticks_since_boot();
     if (now >= start + Execution[argument]) break;
   }
-  rtems_clock_get(RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &stop);
+  stop = rtems_clock_get_ticks_since_boot();
   printf("P%" PRIdPTR "-F ticks:%d\n", argument, stop);
 
   /* delete SELF */
diff --git a/testsuites/sptests/spcbssched03/tasks_periodic.c b/testsuites/sptests/spcbssched03/tasks_periodic.c
index 1e310b4..37b15b4 100644
--- a/testsuites/sptests/spcbssched03/tasks_periodic.c
+++ b/testsuites/sptests/spcbssched03/tasks_periodic.c
@@ -98,7 +98,7 @@ rtems_task Tasks_Periodic(
     if (rtems_rate_monotonic_period(rmid, Periods[argument])==RTEMS_TIMEOUT)
       printf("P%" PRIdPTR " - Deadline miss\n", argument);
 
-    rtems_clock_get(RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &start);
+    start = rtems_clock_get_ticks_since_boot();
     printf("P%" PRIdPTR "-S ticks:%d\n", argument, start);
     if ( start >= 2*HP_LENGTH ) break; /* stop */
 
@@ -134,14 +134,14 @@ rtems_task Tasks_Periodic(
 
     /* active computing */
     while(FOREVER) {
-      rtems_clock_get(RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now);
+      now = rtems_clock_get_ticks_since_boot();
       if ( argument == 4 && !Violating_task[ argument ] &&
           (now >= start + Execution[argument]))
         break;
       if ( argument != 4 && (now >= start + Execution[argument]) )
         break;
     }
-    rtems_clock_get(RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &stop);
+    stop = rtems_clock_get_ticks_since_boot();
     printf("P%" PRIdPTR "-F ticks:%d\n", argument, stop);
   }
 
diff --git a/testsuites/sptests/spedfsched03/tasks_aperiodic.c b/testsuites/sptests/spedfsched03/tasks_aperiodic.c
index 753cf3f..c230fd3 100644
--- a/testsuites/sptests/spedfsched03/tasks_aperiodic.c
+++ b/testsuites/sptests/spedfsched03/tasks_aperiodic.c
@@ -38,15 +38,15 @@ rtems_task Tasks_Aperiodic(
     rtems_task_resume( Task_id[5] );
   }
 
-  rtems_clock_get(RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &start);
+  start = rtems_clock_get_ticks_since_boot();
   printf("AT%" PRIdPTR "-S ticks:%d\n", argument, start);
   /* active computing */
 
   while(FOREVER) {
-    rtems_clock_get(RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now);
+    now = rtems_clock_get_ticks_since_boot();
     if (now >= start + Execution[argument]) break;
   }
-  rtems_clock_get(RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &stop);
+  stop = rtems_clock_get_ticks_since_boot();
   printf("P%" PRIdPTR "-F ticks:%d\n", argument, stop);
 
   /* delete SELF */
diff --git a/testsuites/sptests/spedfsched03/tasks_periodic.c b/testsuites/sptests/spedfsched03/tasks_periodic.c
index 21eb7df..4418f2c 100644
--- a/testsuites/sptests/spedfsched03/tasks_periodic.c
+++ b/testsuites/sptests/spedfsched03/tasks_periodic.c
@@ -58,17 +58,17 @@ rtems_task Tasks_Periodic(
     if (rtems_rate_monotonic_period(rmid, Periods[argument])==RTEMS_TIMEOUT)
       printf("P%" PRIdPTR " - Deadline miss\n", argument);
 
-    rtems_clock_get(RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &start);
+    start = rtems_clock_get_ticks_since_boot();
     printf("P%" PRIdPTR "-S ticks:%d\n", argument, start);
     if ( start >= 2*HP_LENGTH ) break; /* stop */
     /* active computing */
 
     /* using periodic statistics */
     while(FOREVER) {
-      rtems_clock_get(RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now);
+      now = rtems_clock_get_ticks_since_boot();
       if (now >= start + Execution[argument]) break;
     }
-    rtems_clock_get(RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &stop);
+    stop = rtems_clock_get_ticks_since_boot();
     printf("P%" PRIdPTR "-F ticks:%d\n", argument, stop);
   }
 
diff --git a/testsuites/sptests/spqreslib/task_periodic.c b/testsuites/sptests/spqreslib/task_periodic.c
index 61bc0bb..b219514 100644
--- a/testsuites/sptests/spqreslib/task_periodic.c
+++ b/testsuites/sptests/spqreslib/task_periodic.c
@@ -100,12 +100,12 @@ rtems_task Task_Periodic(
     if ( rtems_rate_monotonic_period(rmid, Period) == RTEMS_TIMEOUT )
       printf( "P%" PRIdPTR " - Deadline miss\n", argument );
 
-    rtems_clock_get( RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &start );
+    start = rtems_clock_get_ticks_since_boot();
     printf( "P%" PRIdPTR "-S ticks:%d\n", argument, start );
     if ( start > 4*Period+Phase ) break; /* stop */
     /* active computing */
     while(FOREVER) {
-      rtems_clock_get( RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now );
+      now = rtems_clock_get_ticks_since_boot();
       if ( now >= start + Execution ) break;
 
       if ( qres_get_exec_time( server_id, &exec_time, &abs_time ) )
@@ -117,7 +117,7 @@ rtems_task Task_Periodic(
         rtems_test_exit( 0 );
       }
     }
-    rtems_clock_get( RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &stop );
+    stop = rtems_clock_get_ticks_since_boot();
     printf( "P%" PRIdPTR "-F ticks:%d\n", argument, stop );
   }
 
-- 
1.9.3




More information about the devel mailing list