diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-07-25 15:10:11 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-07-26 11:55:47 +0200 |
commit | 88c74ab115b5135d4d93050596905d6ee573dd1e (patch) | |
tree | 395b852dd384040e20a6f178e913dddccac436bf /testsuites | |
parent | score: Create object implementation header (diff) | |
download | rtems-88c74ab115b5135d4d93050596905d6ee573dd1e.tar.bz2 |
score: Merge tod implementation into one file
Delete TOD_MICROSECONDS_PER_SECOND, TOD_MICROSECONDS_TO_TICKS() and
TOD_MILLISECONDS_TO_TICKS().
Diffstat (limited to 'testsuites')
-rw-r--r-- | testsuites/libtests/block06/init.c | 6 | ||||
-rw-r--r-- | testsuites/psxtests/psx01/init.c | 2 | ||||
-rw-r--r-- | testsuites/psxtests/psx05/init.c | 2 | ||||
-rw-r--r-- | testsuites/psxtests/psxclock/init.c | 2 | ||||
-rw-r--r-- | testsuites/samples/nsecs/init.c | 7 | ||||
-rw-r--r-- | testsuites/sptests/sp01/task1.c | 7 | ||||
-rw-r--r-- | testsuites/sptests/sp16/task5.c | 7 | ||||
-rw-r--r-- | testsuites/sptests/spcbssched01/task1.c | 7 | ||||
-rw-r--r-- | testsuites/sptests/spedfsched01/task1.c | 7 |
9 files changed, 15 insertions, 32 deletions
diff --git a/testsuites/libtests/block06/init.c b/testsuites/libtests/block06/init.c index cbab05630c..6352aba933 100644 --- a/testsuites/libtests/block06/init.c +++ b/testsuites/libtests/block06/init.c @@ -202,7 +202,7 @@ bdbuf_wait (const char* who, unsigned long timeout) rtems_event_set out; sc = rtems_event_receive (RTEMS_EVENT_0, RTEMS_WAIT | RTEMS_EVENT_ANY, - TOD_MICROSECONDS_TO_TICKS (timeout * 1000), + RTEMS_MICROSECONDS_TO_TICKS (timeout * 1000), &out); if (sc != RTEMS_SUCCESSFUL) { @@ -236,7 +236,7 @@ bdbuf_watch (unsigned long timeout) rtems_event_set out; sc = rtems_event_receive (RTEMS_EVENT_1, RTEMS_WAIT | RTEMS_EVENT_ANY, - TOD_MICROSECONDS_TO_TICKS (timeout * 1000), + RTEMS_MICROSECONDS_TO_TICKS (timeout * 1000), &out); if (sc != RTEMS_SUCCESSFUL) { @@ -330,7 +330,7 @@ static bool bdbuf_sleep (unsigned long msecs) { rtems_status_code sc; - sc = rtems_task_wake_after (TOD_MICROSECONDS_TO_TICKS (msecs * 1000)); + sc = rtems_task_wake_after (RTEMS_MICROSECONDS_TO_TICKS (msecs * 1000)); if (sc != RTEMS_SUCCESSFUL) { bdbuf_test_printf ("sleep wake after failed: "); diff --git a/testsuites/psxtests/psx01/init.c b/testsuites/psxtests/psx01/init.c index 13eb0246cc..128bf23c02 100644 --- a/testsuites/psxtests/psx01/init.c +++ b/testsuites/psxtests/psx01/init.c @@ -18,6 +18,8 @@ #include "system.h" #include "pritime.h" +#include <rtems/score/tod.h> + void *POSIX_Init( void *argument ) diff --git a/testsuites/psxtests/psx05/init.c b/testsuites/psxtests/psx05/init.c index 06b5a371af..dc6a0c1637 100644 --- a/testsuites/psxtests/psx05/init.c +++ b/testsuites/psxtests/psx05/init.c @@ -17,6 +17,8 @@ #include "system.h" #include <errno.h> +#include <rtems/score/tod.h> + #define MUTEX_BAD_ID 0xfffffffe void Print_mutexattr( diff --git a/testsuites/psxtests/psxclock/init.c b/testsuites/psxtests/psxclock/init.c index 16b3c3c6d3..819bc15d6d 100644 --- a/testsuites/psxtests/psxclock/init.c +++ b/testsuites/psxtests/psxclock/init.c @@ -17,6 +17,8 @@ #include "pmacros.h" #include "pritime.h" +#include <rtems/score/tod.h> + /* forward declarations to avoid warnings */ rtems_task Init(rtems_task_argument argument); void check_enosys(int status); diff --git a/testsuites/samples/nsecs/init.c b/testsuites/samples/nsecs/init.c index f94c672d0c..fe5390dc38 100644 --- a/testsuites/samples/nsecs/init.c +++ b/testsuites/samples/nsecs/init.c @@ -23,6 +23,7 @@ #include <string.h> #include <stdlib.h> #include <unistd.h> +#include <time.h> #include <sys/time.h> #define CONFIGURE_INIT @@ -81,13 +82,9 @@ rtems_task Init( for (index=0 ; index <10 ; index++ ) { struct timespec start, stop; struct timespec diff; -#if 0 + clock_gettime( CLOCK_REALTIME, &start ); clock_gettime( CLOCK_REALTIME, &stop ); -#else - _TOD_Get( &start ); - _TOD_Get( &stop ); -#endif subtract_em( &start, &stop, &diff ); printf( "Start: %s:%ld\nStop : %s:%ld", diff --git a/testsuites/sptests/sp01/task1.c b/testsuites/sptests/sp01/task1.c index 1527b808a6..d2b824afc1 100644 --- a/testsuites/sptests/sp01/task1.c +++ b/testsuites/sptests/sp01/task1.c @@ -25,12 +25,7 @@ rtems_task Task_1_through_3( status = rtems_object_get_classic_name( rtems_task_self(), &name ); directive_failed( status, "rtems_object_get_classic_name" ); - /* - * Use TOD_MILLISECONDS_TO_TICKS not RTEMS_MILLISECONDS_TO_TICKS to - * test C implementation in SuperCore -- not macro version used - * everywhere else. - */ - ticks = TOD_MILLISECONDS_TO_TICKS( index * 5 * 1000 ); + ticks = RTEMS_MILLISECONDS_TO_TICKS( index * 5 * 1000 ); while( FOREVER ) { status = rtems_clock_get_tod( &time ); diff --git a/testsuites/sptests/sp16/task5.c b/testsuites/sptests/sp16/task5.c index ced8c27106..d2dcc4e527 100644 --- a/testsuites/sptests/sp16/task5.c +++ b/testsuites/sptests/sp16/task5.c @@ -46,12 +46,7 @@ rtems_task Task5( Put_address_from_area_1( segment_address_1 ); new_line; - /* - * Use TOD_MICROSECONDS_TO_TICKS not RTEMS_MICROSECONDS_TO_TICKS to - * test C implementation in SuperCore -- not macro version used - * everywhere else. - */ - status = rtems_task_wake_after( TOD_MICROSECONDS_TO_TICKS( 1000000 ) ); + status = rtems_task_wake_after( RTEMS_MICROSECONDS_TO_TICKS( 1000000 ) ); directive_failed( status, "rtems_task_wake_after" ); puts( "TA5 - rtems_region_get_segment - wait on 3K segment from region 1" ); diff --git a/testsuites/sptests/spcbssched01/task1.c b/testsuites/sptests/spcbssched01/task1.c index 0139f04715..cf965491e6 100644 --- a/testsuites/sptests/spcbssched01/task1.c +++ b/testsuites/sptests/spcbssched01/task1.c @@ -34,12 +34,7 @@ rtems_task Task_1_through_3( status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid ); directive_failed( status, "rtems_task_ident" ); - /* - * Use TOD_MILLISECONDS_TO_TICKS not RTEMS_MILLISECONDS_TO_TICKS to - * test C implementation in SuperCore -- not macro version used - * everywhere else. - */ - ticks = TOD_MILLISECONDS_TO_TICKS( task_number( tid ) * 5 * 1000 ); + ticks = RTEMS_MILLISECONDS_TO_TICKS( task_number( tid ) * 5 * 1000 ); while( FOREVER ) { status = rtems_clock_get_tod( &time ); diff --git a/testsuites/sptests/spedfsched01/task1.c b/testsuites/sptests/spedfsched01/task1.c index a668190613..d38df41a46 100644 --- a/testsuites/sptests/spedfsched01/task1.c +++ b/testsuites/sptests/spedfsched01/task1.c @@ -34,12 +34,7 @@ rtems_task Task_1_through_3( status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid ); directive_failed( status, "rtems_task_ident" ); - /* - * Use TOD_MILLISECONDS_TO_TICKS not RTEMS_MILLISECONDS_TO_TICKS to - * test C implementation in SuperCore -- not macro version used - * everywhere else. - */ - ticks = TOD_MILLISECONDS_TO_TICKS( task_number( tid ) * 5 * 1000 ); + ticks = RTEMS_MILLISECONDS_TO_TICKS( task_number( tid ) * 5 * 1000 ); while( FOREVER ) { status = rtems_clock_get_tod( &time ); |