diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1996-08-09 18:47:58 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1996-08-09 18:47:58 +0000 |
commit | d0b52492cd448b896e7d1ab70a66798f0f09243e (patch) | |
tree | 40a60c553d07c2f7175fdc2a211acadcd53f3f59 /c/src/tests/psxtests | |
parent | added test cases for errors in sched_get_priority_min and (diff) | |
download | rtems-d0b52492cd448b896e7d1ab70a66798f0f09243e.tar.bz2 |
added test case for sched_yield.
changed format of some output.
Diffstat (limited to 'c/src/tests/psxtests')
-rw-r--r-- | c/src/tests/psxtests/psx01/task.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/c/src/tests/psxtests/psx01/task.c b/c/src/tests/psxtests/psx01/task.c index d9ee2e781a..7af0d7bd8d 100644 --- a/c/src/tests/psxtests/psx01/task.c +++ b/c/src/tests/psxtests/psx01/task.c @@ -25,15 +25,23 @@ void Test_init_routine( void ) { puts( "Test_init_routine: invoked" ); } - + void *Task_1_through_3( void *argument ) { - int status; + int status; pthread_once_t once = PTHREAD_ONCE_INIT; + puts( "Task_1: sched_yield to Init" ); + status = sched_yield(); + assert( !status ); + + /* switch to Task_1 */ + + /* now do some real testing */ + empty_line(); /* get id of this thread */ @@ -45,19 +53,19 @@ void *Task_1_through_3( status = pthread_equal( Task_id, Task_id ); if ( status ) - puts( "Task_1: pthread_equal match case passed" ); + puts( "Task_1: pthread_equal - match case passed" ); assert( status ); status = pthread_equal( Init_id, Task_id ); if ( !status ) - puts( "Task_1: pthread_equal different case passed" ); + puts( "Task_1: pthread_equal - different case passed" ); assert( !status ); - puts( "Task_1: pthread_equal first id bad" ); + puts( "Task_1: pthread_equal - first id bad" ); status = pthread_equal( -1, Task_id ); assert( !status ); - puts( "Task_1: pthread_equal second id bad" ); + puts( "Task_1: pthread_equal - second id bad" ); status = pthread_equal( Init_id, -1 ); assert( !status ); |