summaryrefslogtreecommitdiffstats
path: root/testsuites/sptests/sp01/task1.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2011-06-11 19:26:41 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2011-06-11 19:26:41 +0000
commit300fe1c6e05818e988e3b995985e0b411c3d9406 (patch)
tree26c79276df67a6d3efa7746935d244583c8621ea /testsuites/sptests/sp01/task1.c
parent2011-06-11 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-300fe1c6e05818e988e3b995985e0b411c3d9406.tar.bz2
2011-06-11 Joel Sherrill <joel.sherrill@oarcorp.com>
* sp01/init.c, sp01/sp01.doc, sp01/system.h, sp01/task1.c, sp02/init.c, sp02/preempt.c, sp02/sp02.doc, sp02/system.h, sp02/task1.c, sp02/task2.c, sp02/task3.c, sp03/init.c, sp03/sp03.doc, sp03/system.h, sp03/task1.c, sp03/task2.c: Clean up. Update.
Diffstat (limited to '')
-rw-r--r--testsuites/sptests/sp01/task1.c25
1 files changed, 8 insertions, 17 deletions
diff --git a/testsuites/sptests/sp01/task1.c b/testsuites/sptests/sp01/task1.c
index 90fd2965e8..def9d6389b 100644
--- a/testsuites/sptests/sp01/task1.c
+++ b/testsuites/sptests/sp01/task1.c
@@ -1,14 +1,5 @@
-/* Task_1_through_3
- *
- * This routine serves as a test task. It verifies the basic task
- * switching capabilities of the executive.
- *
- * Input parameters:
- * argument - task argument
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
+/*
+ * COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -25,23 +16,23 @@
#include "system.h"
rtems_task Task_1_through_3(
- rtems_task_argument argument
+ rtems_task_argument index
)
{
- rtems_id tid;
rtems_time_of_day time;
rtems_status_code status;
rtems_interval ticks;
+ rtems_name name;
- status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid );
- directive_failed( status, "rtems_task_ident" );
+ status = rtems_object_get_classic_name( rtems_task_self(), &name );
+ directive_failed( status, "rtems_object_get_classic_name" );
/*
* 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 );
+ ticks = TOD_MILLISECONDS_TO_TICKS( index * 5 * 1000 );
while( FOREVER ) {
status = rtems_clock_get_tod( &time );
@@ -52,7 +43,7 @@ rtems_task Task_1_through_3(
rtems_test_exit( 0 );
}
- put_name( Task_name[ task_number( tid ) ], FALSE );
+ put_name( name, FALSE );
print_time( " - rtems_clock_get_tod - ", &time, "\n" );
status = rtems_task_wake_after( ticks );