forked from Imagelibrary/rtems
2009-07-01 Joel Sherrill <joel.sherrill@OARcorp.com>
* sp01/sp01.doc, sp01/task1.c, sp16/sp16.doc, sp16/task5.c: Bypass RTEMS_MILLISECONDS_TO_TICKS and RTEMS_MICROSECONDS_TO_TICKS to improve coverage.
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
2009-07-01 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||||
|
|
||||||
|
* sp01/sp01.doc, sp01/task1.c, sp16/sp16.doc, sp16/task5.c: Bypass
|
||||||
|
RTEMS_MILLISECONDS_TO_TICKS and RTEMS_MICROSECONDS_TO_TICKS to
|
||||||
|
improve coverage.
|
||||||
|
|
||||||
2009-07-01 Joel Sherrill <joel.sherrill@OARcorp.com>
|
2009-07-01 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||||
|
|
||||||
* sp01/task1.c: Use RTEMS_MILLISECONDS_TO_TICKS to improve coverage.
|
* sp01/task1.c: Use RTEMS_MILLISECONDS_TO_TICKS to improve coverage.
|
||||||
|
|||||||
@@ -37,6 +37,9 @@ concepts:
|
|||||||
|
|
||||||
g. Verifies that a task can get the task identification number of itself.
|
g. Verifies that a task can get the task identification number of itself.
|
||||||
|
|
||||||
|
h. Verifies implementation of SuperCore TOD_MILLISECONDS_TO_TICKS. Normal
|
||||||
|
computation in applications is via a macro at the Classic API level.
|
||||||
|
|
||||||
output:
|
output:
|
||||||
"TA1" is printed once every 5 seconds. "TA2" is printed once
|
"TA1" is printed once every 5 seconds. "TA2" is printed once
|
||||||
every 10 seconds. "TA3" is printed once every 15 seconds.
|
every 10 seconds. "TA3" is printed once every 15 seconds.
|
||||||
|
|||||||
@@ -32,7 +32,13 @@ rtems_task Task_1_through_3(
|
|||||||
status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid );
|
status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid );
|
||||||
directive_failed( status, "rtems_task_ident" );
|
directive_failed( status, "rtems_task_ident" );
|
||||||
|
|
||||||
ticks = RTEMS_MILLISECONDS_TO_TICKS( task_number( tid ) * 5 * 1000 );
|
/*
|
||||||
|
* 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 );
|
||||||
|
|
||||||
while( FOREVER ) {
|
while( FOREVER ) {
|
||||||
status = rtems_clock_get( RTEMS_CLOCK_GET_TOD, &time );
|
status = rtems_clock_get( RTEMS_CLOCK_GET_TOD, &time );
|
||||||
directive_failed( status, "rtems_clock_get" );
|
directive_failed( status, "rtems_clock_get" );
|
||||||
|
|||||||
@@ -21,3 +21,6 @@ directives:
|
|||||||
concepts:
|
concepts:
|
||||||
|
|
||||||
a. This test checks out the region manager.
|
a. This test checks out the region manager.
|
||||||
|
|
||||||
|
b. Verifies implementation of SuperCore TOD_MICROSECONDS_TO_TICKS. Normal
|
||||||
|
computation in applications is via a macro at the Classic API level.
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* Output parameters: NONE
|
* Output parameters: NONE
|
||||||
*
|
*
|
||||||
* COPYRIGHT (c) 1989-1999.
|
* COPYRIGHT (c) 1989-2009.
|
||||||
* On-Line Applications Research Corporation (OAR).
|
* On-Line Applications Research Corporation (OAR).
|
||||||
*
|
*
|
||||||
* The license and distribution terms for this file may be
|
* The license and distribution terms for this file may be
|
||||||
@@ -44,7 +44,12 @@ rtems_task Task5(
|
|||||||
Put_address_from_area_1( segment_address_1 );
|
Put_address_from_area_1( segment_address_1 );
|
||||||
new_line;
|
new_line;
|
||||||
|
|
||||||
status = rtems_task_wake_after( TICKS_PER_SECOND );
|
/*
|
||||||
|
* 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 ) );
|
||||||
directive_failed( status, "rtems_task_wake_after" );
|
directive_failed( status, "rtems_task_wake_after" );
|
||||||
|
|
||||||
puts( "TA5 - rtems_region_get_segment - wait on 3K segment from region 1" );
|
puts( "TA5 - rtems_region_get_segment - wait on 3K segment from region 1" );
|
||||||
|
|||||||
Reference in New Issue
Block a user