From 9992cac4967f5d648c29dc9dba6ec4e8353f92af Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 12 Aug 2009 20:50:29 +0000 Subject: 2009-08-12 Joel Sherrill * mp01/task1.c, mp02/task1.c, mp03/task1.c, mp05/task1.c, mp06/task1.c, mp07/task1.c, mp08/task1.c, mp09/recvmsg.c, mp09/sendmsg.c, mp09/task1.c, mp10/init.c, mp12/init.c, mp13/init.c, mp13/task1.c, mp13/task2.c, mp14/evtask1.c, mp14/init.c: Eliminate test routines TICKS_PER_SECOND and get_ticks_per_second() in favor of new rtems_clock_get_ticks_per_second(). --- testsuites/mptests/ChangeLog | 9 +++++++++ testsuites/mptests/mp01/task1.c | 4 ++-- testsuites/mptests/mp02/task1.c | 4 ++-- testsuites/mptests/mp03/task1.c | 4 ++-- testsuites/mptests/mp05/task1.c | 4 ++-- testsuites/mptests/mp06/task1.c | 8 ++++---- testsuites/mptests/mp07/task1.c | 6 +++--- testsuites/mptests/mp08/task1.c | 4 ++-- testsuites/mptests/mp09/recvmsg.c | 4 ++-- testsuites/mptests/mp09/sendmsg.c | 8 ++++---- testsuites/mptests/mp09/task1.c | 6 +++--- testsuites/mptests/mp10/init.c | 4 ++-- testsuites/mptests/mp12/init.c | 8 ++++---- testsuites/mptests/mp13/init.c | 4 ++-- testsuites/mptests/mp13/task1.c | 4 ++-- testsuites/mptests/mp13/task2.c | 12 ++++++------ testsuites/mptests/mp14/evtask1.c | 4 ++-- testsuites/mptests/mp14/init.c | 4 ++-- 18 files changed, 55 insertions(+), 46 deletions(-) (limited to 'testsuites/mptests') diff --git a/testsuites/mptests/ChangeLog b/testsuites/mptests/ChangeLog index 2f9252c956..6e58c61272 100644 --- a/testsuites/mptests/ChangeLog +++ b/testsuites/mptests/ChangeLog @@ -1,3 +1,12 @@ +2009-08-12 Joel Sherrill + + * mp01/task1.c, mp02/task1.c, mp03/task1.c, mp05/task1.c, mp06/task1.c, + mp07/task1.c, mp08/task1.c, mp09/recvmsg.c, mp09/sendmsg.c, + mp09/task1.c, mp10/init.c, mp12/init.c, mp13/init.c, mp13/task1.c, + mp13/task2.c, mp14/evtask1.c, mp14/init.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 * mp01/task1.c, mp01/node1/mp01-node1.scn, mp01/node2/mp01-node2.scn: diff --git a/testsuites/mptests/mp01/task1.c b/testsuites/mptests/mp01/task1.c index d134135032..5bf607f0f2 100644 --- a/testsuites/mptests/mp01/task1.c +++ b/testsuites/mptests/mp01/task1.c @@ -13,7 +13,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 @@ -42,7 +42,7 @@ rtems_task Test_task( put_name( Task_name[ task_number( tid ) ], FALSE ); print_time( " - rtems_clock_get_tod - ", &time, "\n" ); - status = rtems_task_wake_after( task_number( tid ) * 1 * TICKS_PER_SECOND ); + status = rtems_task_wake_after( task_number( tid ) * 1 * rtems_clock_get_ticks_per_second() ); directive_failed( status, "rtems_task_wake_after" ); status = rtems_clock_get_tod( &time ); diff --git a/testsuites/mptests/mp02/task1.c b/testsuites/mptests/mp02/task1.c index 6e63a7c9fe..920a0d585a 100644 --- a/testsuites/mptests/mp02/task1.c +++ b/testsuites/mptests/mp02/task1.c @@ -9,7 +9,7 @@ * * Output parameters: NONE * - * COPYRIGHT (c) 1989-2008. + * COPYRIGHT (c) 1989-2009. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -103,7 +103,7 @@ rtems_task Test_task( tmpNode ); - status = rtems_task_wake_after( TICKS_PER_SECOND ); + status = rtems_task_wake_after( rtems_clock_get_ticks_per_second() ); directive_failed( status, "rtems_task_wake_after" ); puts( "*** END OF TEST 2 ***" ); diff --git a/testsuites/mptests/mp03/task1.c b/testsuites/mptests/mp03/task1.c index f1a3d90760..cf6d4dab4e 100644 --- a/testsuites/mptests/mp03/task1.c +++ b/testsuites/mptests/mp03/task1.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 @@ -48,7 +48,7 @@ void Test_Task_Support( fatal_directive_status(status, RTEMS_UNSATISFIED, "rtems_event_receive"); - status = rtems_task_wake_after( 2 * TICKS_PER_SECOND ); + status = rtems_task_wake_after( 2 * rtems_clock_get_ticks_per_second() ); directive_failed( status, "rtems_task_wake_after" ); put_name( Task_name[ node ], FALSE ); diff --git a/testsuites/mptests/mp05/task1.c b/testsuites/mptests/mp05/task1.c index 4a77fec531..20fbdc0892 100644 --- a/testsuites/mptests/mp05/task1.c +++ b/testsuites/mptests/mp05/task1.c @@ -11,7 +11,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 @@ -73,7 +73,7 @@ rtems_task Test_task( status = rtems_timer_fire_after( Timer_id[ 1 ], - 3 * TICKS_PER_SECOND, + 3 * rtems_clock_get_ticks_per_second(), Stop_Test_TSR, NULL ); diff --git a/testsuites/mptests/mp06/task1.c b/testsuites/mptests/mp06/task1.c index fd3331bed9..8e9fd71b25 100644 --- a/testsuites/mptests/mp06/task1.c +++ b/testsuites/mptests/mp06/task1.c @@ -9,7 +9,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 @@ -115,7 +115,7 @@ rtems_task Test_task( status = rtems_timer_fire_after( Timer_id[ 1 ], - 5 * TICKS_PER_SECOND, + 5 * rtems_clock_get_ticks_per_second(), Stop_Test_TSR, NULL ); @@ -139,7 +139,7 @@ rtems_task Test_task( status = rtems_event_receive( event_for_this_iteration, RTEMS_DEFAULT_OPTIONS, - 1 * TICKS_PER_SECOND, + 1 * rtems_clock_get_ticks_per_second(), &event_out ); if ( rtems_are_statuses_equal( status, RTEMS_TIMEOUT ) ) { @@ -169,7 +169,7 @@ rtems_task Test_task( status = rtems_event_receive( RTEMS_EVENT_16, RTEMS_DEFAULT_OPTIONS, - 1 * TICKS_PER_SECOND, + 1 * rtems_clock_get_ticks_per_second(), &event_out ); fatal_directive_status( status, RTEMS_TIMEOUT, "rtems_event_receive" ); diff --git a/testsuites/mptests/mp07/task1.c b/testsuites/mptests/mp07/task1.c index bc7697051b..ff2659081f 100644 --- a/testsuites/mptests/mp07/task1.c +++ b/testsuites/mptests/mp07/task1.c @@ -9,7 +9,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 @@ -64,7 +64,7 @@ rtems_task Test_task( status = rtems_timer_fire_after( Timer_id[ 1 ], - 5 * TICKS_PER_SECOND, + 5 * rtems_clock_get_ticks_per_second(), Stop_Test_TSR, NULL ); @@ -75,7 +75,7 @@ rtems_task Test_task( status = rtems_event_receive( RTEMS_EVENT_16, RTEMS_DEFAULT_OPTIONS, - TICKS_PER_SECOND, + rtems_clock_get_ticks_per_second(), &event_out ); if ( status == RTEMS_TIMEOUT ) { diff --git a/testsuites/mptests/mp08/task1.c b/testsuites/mptests/mp08/task1.c index f547cccfe0..9191049771 100644 --- a/testsuites/mptests/mp08/task1.c +++ b/testsuites/mptests/mp08/task1.c @@ -8,7 +8,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 @@ -69,7 +69,7 @@ rtems_task Test_task( } if ( Multiprocessing_configuration.node == 1 && ++count == 1000 ) { - status = rtems_task_wake_after( TICKS_PER_SECOND ); + status = rtems_task_wake_after( rtems_clock_get_ticks_per_second() ); directive_failed( status, "rtems_task_wake_after" ); puts( "\nDeleting global semaphore" ); diff --git a/testsuites/mptests/mp09/recvmsg.c b/testsuites/mptests/mp09/recvmsg.c index 5f9f2738db..72b4e84207 100644 --- a/testsuites/mptests/mp09/recvmsg.c +++ b/testsuites/mptests/mp09/recvmsg.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 @@ -41,6 +41,6 @@ void Receive_messages() } puts( "Receiver delaying for a second" ); - status = rtems_task_wake_after( TICKS_PER_SECOND ); + status = rtems_task_wake_after( rtems_clock_get_ticks_per_second() ); directive_failed( status, "rtems_task_wake_after" ); } diff --git a/testsuites/mptests/mp09/sendmsg.c b/testsuites/mptests/mp09/sendmsg.c index 03f02790e5..39e4025df3 100644 --- a/testsuites/mptests/mp09/sendmsg.c +++ b/testsuites/mptests/mp09/sendmsg.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 @@ -31,7 +31,7 @@ void Send_messages() directive_failed( status, "rtems_message_queue_send" ); puts( "Delaying for a second" ); - status = rtems_task_wake_after( TICKS_PER_SECOND ); + status = rtems_task_wake_after( rtems_clock_get_ticks_per_second() ); directive_failed( status, "rtems_task_wake_after" ); puts_nocr( "rtems_message_queue_urgent: " ); @@ -40,7 +40,7 @@ void Send_messages() directive_failed( status, "rtems_message_queue_urgent" ); puts( "Delaying for a second" ); - status = rtems_task_wake_after( TICKS_PER_SECOND ); + status = rtems_task_wake_after( rtems_clock_get_ticks_per_second() ); directive_failed( status, "rtems_task_wake_after" ); puts_nocr( "rtems_message_queue_broadcast: " ); @@ -54,6 +54,6 @@ void Send_messages() directive_failed( status, "rtems_message_queue_broadcast" ); puts( "Delaying for a second" ); - status = rtems_task_wake_after( TICKS_PER_SECOND ); + status = rtems_task_wake_after( rtems_clock_get_ticks_per_second() ); directive_failed( status, "rtems_task_wake_after" ); } diff --git a/testsuites/mptests/mp09/task1.c b/testsuites/mptests/mp09/task1.c index a198528fb8..130238245f 100644 --- a/testsuites/mptests/mp09/task1.c +++ b/testsuites/mptests/mp09/task1.c @@ -8,7 +8,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 @@ -34,7 +34,7 @@ rtems_task Test_task( size_t size; char receive_buffer[16]; - status = rtems_task_wake_after( TICKS_PER_SECOND ); + status = rtems_task_wake_after( rtems_clock_get_ticks_per_second() ); directive_failed( status, "rtems_task_wake_after" ); puts( "Getting QID of message queue" ); @@ -95,7 +95,7 @@ rtems_task Test_task( Send_messages(); puts( "Delaying for 5 seconds" ); - status = rtems_task_wake_after( 5*TICKS_PER_SECOND ); + status = rtems_task_wake_after( 5*rtems_clock_get_ticks_per_second() ); directive_failed( status, "rtems_task_wake_after" ); puts( "Deleting Message queue" ); diff --git a/testsuites/mptests/mp10/init.c b/testsuites/mptests/mp10/init.c index 2f8d419e8a..6ec124e2d2 100644 --- a/testsuites/mptests/mp10/init.c +++ b/testsuites/mptests/mp10/init.c @@ -17,7 +17,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 @@ -70,7 +70,7 @@ rtems_task Init( ); directive_failed( status, "rtems_semaphore_create" ); - status = rtems_task_wake_after( 10 * TICKS_PER_SECOND ); + status = rtems_task_wake_after( 10 * rtems_clock_get_ticks_per_second() ); directive_failed( status, "rtems_task_wake_after" ); } else { diff --git a/testsuites/mptests/mp12/init.c b/testsuites/mptests/mp12/init.c index 5e3c37342a..46f0618f86 100644 --- a/testsuites/mptests/mp12/init.c +++ b/testsuites/mptests/mp12/init.c @@ -16,7 +16,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 @@ -51,7 +51,7 @@ rtems_task Init( puts( "Got to initialization task" ); if ( Multiprocessing_configuration.node == 2 ) { - status = rtems_task_wake_after( 1 * TICKS_PER_SECOND ); + status = rtems_task_wake_after( rtems_clock_get_ticks_per_second() ); directive_failed( status, "rtems_task_wake_after" ); puts( "Getting ID of remote Partition (Global)" ); @@ -84,7 +84,7 @@ rtems_task Init( status = rtems_partition_return_buffer( Partition_id[ 1 ], bufaddr ); directive_failed( status, "rtems_partition_return_buffer" ); - status = rtems_task_wake_after( 2 * TICKS_PER_SECOND ); + status = rtems_task_wake_after( 2 * rtems_clock_get_ticks_per_second() ); directive_failed( status, "rtems_task_wake_after" ); } else { @@ -100,7 +100,7 @@ rtems_task Init( directive_failed( status, "rtems_partition_create" ); puts( "Sleeping for two seconds" ); - status = rtems_task_wake_after( 2 * TICKS_PER_SECOND ); + status = rtems_task_wake_after( 2 * rtems_clock_get_ticks_per_second() ); directive_failed( status, "rtems_task_wake_after" ); puts( "Deleting Partition (Global)" ); diff --git a/testsuites/mptests/mp13/init.c b/testsuites/mptests/mp13/init.c index 9f5faa5073..1b82853028 100644 --- a/testsuites/mptests/mp13/init.c +++ b/testsuites/mptests/mp13/init.c @@ -11,7 +11,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 @@ -102,7 +102,7 @@ rtems_task Init( directive_failed( status, "rtems_task_start" ); if ( Multiprocessing_configuration.node == 1 ) { - status = rtems_task_wake_after( 5 * TICKS_PER_SECOND ); + status = rtems_task_wake_after( 5 * rtems_clock_get_ticks_per_second() ); directive_failed( status, "rtems_task_wake_after" ); puts( "*** END OF TEST 13 ***" ); diff --git a/testsuites/mptests/mp13/task1.c b/testsuites/mptests/mp13/task1.c index 23d744a2e8..08c1485a9d 100644 --- a/testsuites/mptests/mp13/task1.c +++ b/testsuites/mptests/mp13/task1.c @@ -9,7 +9,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 @@ -52,7 +52,7 @@ rtems_task Test_task1( directive_failed( status, "rtems_message_queue_receive" ); } - status = rtems_task_wake_after( TICKS_PER_SECOND ); + status = rtems_task_wake_after( rtems_clock_get_ticks_per_second() ); directive_failed( status, "rtems_task_wake_after" ); puts( "Receiving message ..." ); diff --git a/testsuites/mptests/mp13/task2.c b/testsuites/mptests/mp13/task2.c index 094dd7a8bc..89deab59b8 100644 --- a/testsuites/mptests/mp13/task2.c +++ b/testsuites/mptests/mp13/task2.c @@ -9,7 +9,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 @@ -39,14 +39,14 @@ rtems_task Test_task2( directive_failed( status, "rtems_semaphore_ident" ); if ( Multiprocessing_configuration.node == 1 ) { - status = rtems_task_wake_after( TICKS_PER_SECOND ); + status = rtems_task_wake_after( rtems_clock_get_ticks_per_second() ); directive_failed( status, "rtems_task_wake_after" ); puts( "Releasing semaphore ..." ); status = rtems_semaphore_release( Semaphore_id[ 1 ] ); directive_failed( status, "rtems_semaphore_release" ); - status = rtems_task_wake_after( TICKS_PER_SECOND / 2 ); + status = rtems_task_wake_after( rtems_clock_get_ticks_per_second() / 2 ); directive_failed( status, "rtems_task_wake_after" ); puts( "Getting semaphore ..." ); @@ -68,7 +68,7 @@ rtems_task Test_task2( } /* - status = rtems_task_wake_after( TICKS_PER_SECOND / 2 ); + status = rtems_task_wake_after( rtems_clock_get_ticks_per_second() / 2 ); directive_failed( status, "rtems_task_wake_after" ); */ @@ -84,14 +84,14 @@ rtems_task Test_task2( status = rtems_semaphore_release( Semaphore_id[ 1 ] ); directive_failed( status, "rtems_semaphore_release" ); - status = rtems_task_wake_after( TICKS_PER_SECOND ); + status = rtems_task_wake_after( rtems_clock_get_ticks_per_second() ); directive_failed( status, "rtems_task_wake_after" ); puts( "Getting semaphore ..." ); status = rtems_semaphore_obtain( Semaphore_id[ 1 ], RTEMS_DEFAULT_OPTIONS, - 2 * TICKS_PER_SECOND + 2 * rtems_clock_get_ticks_per_second() ); fatal_directive_status( status, diff --git a/testsuites/mptests/mp14/evtask1.c b/testsuites/mptests/mp14/evtask1.c index 3703d93ced..8f3082bc3d 100644 --- a/testsuites/mptests/mp14/evtask1.c +++ b/testsuites/mptests/mp14/evtask1.c @@ -9,7 +9,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 @@ -36,7 +36,7 @@ rtems_task Test_task( remote_node = ((Multiprocessing_configuration.node == 1) ? 2 : 1); puts( "About to go to sleep!" ); - status = rtems_task_wake_after( TICKS_PER_SECOND ); + status = rtems_task_wake_after( rtems_clock_get_ticks_per_second() ); directive_failed( status, "rtems_task_wake_after" ); puts( "Waking up!" ); diff --git a/testsuites/mptests/mp14/init.c b/testsuites/mptests/mp14/init.c index 2f6036e317..e6bd3901cc 100644 --- a/testsuites/mptests/mp14/init.c +++ b/testsuites/mptests/mp14/init.c @@ -11,7 +11,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 @@ -56,7 +56,7 @@ rtems_task Init( status = rtems_timer_fire_after( timer_id, - MAX_LONG_TEST_DURATION * TICKS_PER_SECOND, + MAX_LONG_TEST_DURATION * rtems_clock_get_ticks_per_second(), Stop_Test_TSR, NULL ); -- cgit v1.2.3