mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-25 13:57:15 +00:00
2009-08-12 Joel Sherrill <joel.sherrill@oarcorp.com>
* 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().
This commit is contained in:
@@ -1,3 +1,12 @@
|
||||
2009-08-12 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
* 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 <joel.sherrill@oarcorp.com>
|
||||
|
||||
* mp01/task1.c, mp01/node1/mp01-node1.scn, mp01/node2/mp01-node2.scn:
|
||||
|
||||
@@ -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 );
|
||||
|
||||
@@ -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 ***" );
|
||||
|
||||
@@ -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 );
|
||||
|
||||
@@ -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
|
||||
);
|
||||
|
||||
@@ -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" );
|
||||
|
||||
@@ -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 ) {
|
||||
|
||||
@@ -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" );
|
||||
|
||||
@@ -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" );
|
||||
}
|
||||
|
||||
@@ -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" );
|
||||
}
|
||||
|
||||
@@ -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" );
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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)" );
|
||||
|
||||
@@ -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 ***" );
|
||||
|
||||
@@ -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 ..." );
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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!" );
|
||||
|
||||
|
||||
@@ -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
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user