summaryrefslogtreecommitdiffstats
path: root/c/src/tests/psxtests/psx01/task.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1996-06-04 14:32:21 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1996-06-04 14:32:21 +0000
commit15974b65ea61303110208353e15375a5d78d9121 (patch)
treebac54f8a88d9efdb0f7f1dcf6720a6409a2cec45 /c/src/tests/psxtests/psx01/task.c
parentadded thread queue for list of threads waiting to join. (diff)
downloadrtems-15974b65ea61303110208353e15375a5d78d9121.tar.bz2
added basic test cases for pthread_self and pthread_equal
Diffstat (limited to 'c/src/tests/psxtests/psx01/task.c')
-rw-r--r--c/src/tests/psxtests/psx01/task.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/c/src/tests/psxtests/psx01/task.c b/c/src/tests/psxtests/psx01/task.c
index 02678aa31c..f26c660f70 100644
--- a/c/src/tests/psxtests/psx01/task.c
+++ b/c/src/tests/psxtests/psx01/task.c
@@ -26,25 +26,25 @@ void *Task_1_through_3(
)
{
int seconds;
+ int status;
/* XXX temporary */
- puts( "*** END OF POSIX TEST 1 ***" );
- exit( 0 );
-
- for ( ; ; ) {
- /* grab the tod */
+ /* get id of this thread */
- /* if we have run longer 35 seconds exit */
+ Task_id = pthread_self();
+ printf( "Task's ID is 0x%08x\n", Task_id );
- if ( seconds >= 35 ) {
- puts( "*** END OF POSIX TEST 1 ***" );
- exit( 0 );
- }
+ status = pthread_equal( Task_id, Task_id );
+ if ( status )
+ puts( "pthread_equal match case passed" );
+ assert( status );
- /* put our task number and the current time */
+ status = pthread_equal( Init_id, Task_id );
+ if ( !status )
+ puts( "pthread_equal different case passed" );
+ assert( !status );
- /* delay based on our thread number */
-
- }
+ puts( "*** END OF POSIX TEST 1 ***" );
+ exit( 0 );
}