summaryrefslogtreecommitdiffstats
path: root/testsuites/samples
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2009-08-12 20:50:38 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2009-08-12 20:50:38 +0000
commit99f0971146d4e621dbb7e242d7f5e3eb382a5ff9 (patch)
tree19f22c4c0a32c909296b4989f2d2e51cab3d5ad7 /testsuites/samples
parent2009-08-12 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-99f0971146d4e621dbb7e242d7f5e3eb382a5ff9.tar.bz2
2009-08-12 Joel Sherrill <joel.sherrill@oarcorp.com>
* cdtest/main.cc, fileio/init.c, fileio/system.h, pppd/pppdapp.c, ticker/system.h, ticker/tasks.c: Eliminate test routines TICKS_PER_SECOND and get_ticks_per_second() in favor of new rtems_clock_get_ticks_per_second().
Diffstat (limited to 'testsuites/samples')
-rw-r--r--testsuites/samples/ChangeLog7
-rw-r--r--testsuites/samples/cdtest/main.cc4
-rw-r--r--testsuites/samples/fileio/init.c6
-rw-r--r--testsuites/samples/fileio/system.h10
-rw-r--r--testsuites/samples/pppd/pppdapp.c2
-rw-r--r--testsuites/samples/ticker/system.h11
-rw-r--r--testsuites/samples/ticker/tasks.c5
7 files changed, 17 insertions, 28 deletions
diff --git a/testsuites/samples/ChangeLog b/testsuites/samples/ChangeLog
index 16f7746405..cb7475a02c 100644
--- a/testsuites/samples/ChangeLog
+++ b/testsuites/samples/ChangeLog
@@ -1,3 +1,10 @@
+2009-08-12 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * cdtest/main.cc, fileio/init.c, fileio/system.h, pppd/pppdapp.c,
+ ticker/system.h, ticker/tasks.c: Eliminate test routines
+ TICKS_PER_SECOND and get_ticks_per_second() in favor of new
+ rtems_clock_get_ticks_per_second().
+
2009-08-10 Joel Sherrill <joel.sherrill@oarcorp.com>
* fileio/system.h, ticker/system.h, ticker/ticker.scn: Convert calls to
diff --git a/testsuites/samples/cdtest/main.cc b/testsuites/samples/cdtest/main.cc
index 668dbbc39a..ecae957864 100644
--- a/testsuites/samples/cdtest/main.cc
+++ b/testsuites/samples/cdtest/main.cc
@@ -152,7 +152,7 @@ cdtest(void)
printf("IO Stream not tested\n");
#endif
bar = blech;
- rtems_task_wake_after( 5 * get_ticks_per_second() );
+ rtems_task_wake_after( 5 * rtems_clock_get_ticks_per_second() );
}
//
@@ -211,7 +211,7 @@ rtems_task main_task(
printf( "Caught another exception.\n" );
}
printf( "Exceptions are working properly.\n" );
- rtems_task_wake_after( 5 * get_ticks_per_second() );
+ rtems_task_wake_after( 5 * rtems_clock_get_ticks_per_second() );
printf( "Global Dtors should be called after this line....\n" );
exit(0);
}
diff --git a/testsuites/samples/fileio/init.c b/testsuites/samples/fileio/init.c
index 5af153a07e..b2fe8cab6d 100644
--- a/testsuites/samples/fileio/init.c
+++ b/testsuites/samples/fileio/init.c
@@ -296,7 +296,7 @@ void fileio_list_file(void)
printf("\n ******** End of file reached, flen = %d\n",flen);
close(fd);
- rtems_clock_get(RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticks_per_sec);
+ ticks_per_sec = rtems_clock_get_ticks_per_second();
printf("time elapsed for read: %g seconds\n",
((double)curr_tick-start_tick)/ticks_per_sec);
}
@@ -361,7 +361,7 @@ void fileio_write_file(void)
/*
* get number of ticks per second
*/
- rtems_clock_get(RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticks_per_sec);
+ ticks_per_sec = rtems_clock_get_ticks_per_second();
/*
* get path to file to write
@@ -520,7 +520,7 @@ void fileio_read_file(void)
/*
* get number of ticks per second
*/
- rtems_clock_get(RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticks_per_sec);
+ ticks_per_sec = rtems_clock_get_ticks_per_second();
/*
* get path to file to read
diff --git a/testsuites/samples/fileio/system.h b/testsuites/samples/fileio/system.h
index 3620eacdb2..f6663d8fd5 100644
--- a/testsuites/samples/fileio/system.h
+++ b/testsuites/samples/fileio/system.h
@@ -101,16 +101,6 @@ rtems_task Init(
} while (0)
/*
- * static inline routine to make obtaining ticks per second easier.
- */
-
-static inline uint32_t get_ticks_per_second( void )
-{
- return rtems_clock_get_ticks_per_second();
-}
-
-
-/*
* This allows us to view the "Test_task" instantiations as a set
* of numbered tasks by eliminating the number of application
* tasks created.
diff --git a/testsuites/samples/pppd/pppdapp.c b/testsuites/samples/pppd/pppdapp.c
index 0e216ff406..7100a06df0 100644
--- a/testsuites/samples/pppd/pppdapp.c
+++ b/testsuites/samples/pppd/pppdapp.c
@@ -90,7 +90,7 @@ static rtems_task pppdapp(rtems_task_argument arg)
rtems_event_set out;
/* initialize ticks per second */
- rtems_clock_get(RTEMS_CLOCK_GET_TICKS_PER_SECOND, &tickspersecond);
+ tickspersecond = rtems_clock_get_ticks_per_second();
if ( tickspersecond == 0 ) {
/* ensure value is greater than zero */
tickspersecond = 100;
diff --git a/testsuites/samples/ticker/system.h b/testsuites/samples/ticker/system.h
index a87ba2c901..ec17872b87 100644
--- a/testsuites/samples/ticker/system.h
+++ b/testsuites/samples/ticker/system.h
@@ -3,7 +3,7 @@
* This include file contains information that is included in every
* function in the test set.
*
- * COPYRIGHT (c) 1989-2008.
+ * COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -89,15 +89,6 @@ extern rtems_name Task_name[ 4 ]; /* array of task names */
} while (0)
/*
- * static inline routine to make obtaining ticks per second easier.
- */
-
-static inline uint32_t get_ticks_per_second( void )
-{
- return rtems_clock_get_ticks_per_second();
-}
-
-/*
* This allows us to view the "Test_task" instantiations as a set
* of numbered tasks by eliminating the number of application
* tasks created.
diff --git a/testsuites/samples/ticker/tasks.c b/testsuites/samples/ticker/tasks.c
index fabdbf7218..2d6c2e0f8e 100644
--- a/testsuites/samples/ticker/tasks.c
+++ b/testsuites/samples/ticker/tasks.c
@@ -7,7 +7,7 @@
*
* Output parameters: NONE
*
- * COPYRIGHT (c) 1989-1999.
+ * COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -38,6 +38,7 @@ rtems_task Test_task(
}
put_name( Task_name[ task_index ], FALSE );
print_time( " - rtems_clock_get_tod - ", &time, "\n" );
- status = rtems_task_wake_after( task_index * 5 * get_ticks_per_second() );
+ status = rtems_task_wake_after(
+ task_index * 5 * rtems_clock_get_ticks_per_second() );
}
}