2009-08-12 Joel Sherrill <joel.sherrill@oarcorp.com>

* itrontask01/task1.c, itrontask02/dormant.c, itrontask03/task1.c,
	itrontask03/task2.c, itrontask03/task3.c, itrontask04/task3.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:
Joel Sherrill
2009-08-12 20:50:24 +00:00
parent 6620c1852d
commit 6d1e9b8bf9
7 changed files with 21 additions and 13 deletions
+7
View File
@@ -1,3 +1,10 @@
2009-08-12 Joel Sherrill <joel.sherrill@oarcorp.com>
* itrontask01/task1.c, itrontask02/dormant.c, itrontask03/task1.c,
itrontask03/task2.c, itrontask03/task3.c, itrontask04/task3.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>
* itrontask01/task1.c: Convert calls to legacy routine rtems_clock_get(
+3 -2
View File
@@ -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
@@ -47,7 +47,8 @@ void Task_2_through_4()
printf(name);
print_time( " - rtems_clock_get_tod - ", &time, "\n" );
status = rtems_task_wake_after( tid_index * 5 * TICKS_PER_SECOND );
status = rtems_task_wake_after(
tid_index * 5 * rtems_clock_get_ticks_per_second() );
directive_failed( status, "rtems_task_wake_after" );
}
}
+2 -2
View File
@@ -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
@@ -37,7 +37,7 @@ void Non_Dormant_task()
while (TRUE) {
puts( "NON-DORMANT - Sleep for 2 minutes" );
status = rtems_task_wake_after( 120*TICKS_PER_SECOND );
status = rtems_task_wake_after( 120*rtems_clock_get_ticks_per_second() );
directive_failed( status, "rtems_task_wake_after" );
}
}
+3 -3
View File
@@ -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
@@ -28,7 +28,7 @@ void Task_1()
*/
puts( "TA1 - rtems_task_wake_after - sleep 1 second" );
status = rtems_task_wake_after( 1*TICKS_PER_SECOND );
status = rtems_task_wake_after( 1*rtems_clock_get_ticks_per_second() );
directive_failed( status, "rtems_task_wake_after" );
status = chg_pri( TA3_ID , 2 );
@@ -49,7 +49,7 @@ void Task_1()
*/
puts( "TA1 - rtems_task_wake_after - sleep 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( "*** END OF ITRON TASK TEST 3 ***" );
+2 -2
View File
@@ -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
@@ -26,6 +26,6 @@ void Task_2()
rtems_status_code status;
puts( "TA2 - rtems_task_wake_after - sleep 1 minute" );
status = rtems_task_wake_after( 60*TICKS_PER_SECOND );
status = rtems_task_wake_after( 60*rtems_clock_get_ticks_per_second() );
directive_failed( status, "rtems_task_wake_after in TA2" );
}
+2 -2
View File
@@ -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
@@ -29,7 +29,7 @@ void Task_3()
*/
puts( "TA3 - rtems_task_wake_after - sleep 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 in TA3" );
+2 -2
View File
@@ -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
@@ -43,7 +43,7 @@ void Task_3()
*/
puts( "TA3 - rtems_task_wake_after - sleep 1 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 in TA3" );
}