diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1996-05-29 16:06:47 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1996-05-29 16:06:47 +0000 |
commit | 0252200299d1e00a6664c1661939d418dd54cb53 (patch) | |
tree | 125f458eccad867838db1295551ef60b91d6780e /c/src/tests/psxtests/psx01/task.c | |
parent | Added default POSIX API configuration table. (diff) | |
download | rtems-0252200299d1e00a6664c1661939d418dd54cb53.tar.bz2 |
Gutted test of rtems api calls and added comments to indicate what the test
should do in their place. It now compiles and links.
Diffstat (limited to '')
-rw-r--r-- | c/src/tests/psxtests/psx01/task.c | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/c/src/tests/psxtests/psx01/task.c b/c/src/tests/psxtests/psx01/task.c index b45d3abce6..f6f365ab51 100644 --- a/c/src/tests/psxtests/psx01/task.c +++ b/c/src/tests/psxtests/psx01/task.c @@ -21,30 +21,25 @@ #include "system.h" -rtems_task Task_1_through_3( - rtems_task_argument argument +void Task_1_through_3( + void *argument ) { - rtems_id tid; - rtems_time_of_day time; - rtems_status_code status; + int seconds; - status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid ); - directive_failed( status, "rtems_task_ident" ); + for ( ; ; ) { + /* grab the tod */ - while( FOREVER ) { - status = rtems_clock_get( RTEMS_CLOCK_GET_TOD, &time ); - directive_failed( status, "rtems_clock_get" ); + /* if we have run longer 35 seconds exit */ - if ( time.second >= 35 ) { - puts( "*** END OF TEST 1 ***" ); + if ( seconds >= 35 ) { + puts( "*** END OF POSIX TEST 1 ***" ); exit( 0 ); } - put_name( Task_name[ task_number( tid ) ], FALSE ); - print_time( " - rtems_clock_get - ", &time, "\n" ); + /* put our task number and the current time */ - status = rtems_task_wake_after( task_number( tid ) * 5 * TICKS_PER_SECOND ); - directive_failed( status, "rtems_task_wake_after" ); + /* delay based on our thread number */ + } } |