diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-07-01 19:23:58 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-07-01 19:23:58 +0000 |
commit | c7b38baf378930840d86b24765291f442dbf14ea (patch) | |
tree | 235123dc37ead8a4bd4ed5b3f5b73f0a5321f6e5 /testsuites/sptests/sp01 | |
parent | 2009-07-01 Joel Sherrill <joel.sherrill@OARcorp.com> (diff) | |
download | rtems-c7b38baf378930840d86b24765291f442dbf14ea.tar.bz2 |
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.
Diffstat (limited to 'testsuites/sptests/sp01')
-rw-r--r-- | testsuites/sptests/sp01/sp01.doc | 3 | ||||
-rw-r--r-- | testsuites/sptests/sp01/task1.c | 8 |
2 files changed, 10 insertions, 1 deletions
diff --git a/testsuites/sptests/sp01/sp01.doc b/testsuites/sptests/sp01/sp01.doc index b3757cafa6..0944fe8235 100644 --- a/testsuites/sptests/sp01/sp01.doc +++ b/testsuites/sptests/sp01/sp01.doc @@ -37,6 +37,9 @@ concepts: 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: "TA1" is printed once every 5 seconds. "TA2" is printed once every 10 seconds. "TA3" is printed once every 15 seconds. diff --git a/testsuites/sptests/sp01/task1.c b/testsuites/sptests/sp01/task1.c index 6565feb839..7866369f59 100644 --- a/testsuites/sptests/sp01/task1.c +++ b/testsuites/sptests/sp01/task1.c @@ -32,7 +32,13 @@ rtems_task Task_1_through_3( status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid ); 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 ) { status = rtems_clock_get( RTEMS_CLOCK_GET_TOD, &time ); directive_failed( status, "rtems_clock_get" ); |