Index: testsuites/psxtests/psx08/init.c
===================================================================
--- testsuites/psxtests/psx08/init.c	(revision 60b791ada1b6fe870f7b1e76a5a80ad17c86a2e8)
+++ testsuites/psxtests/psx08/init.c	(revision 7d9632183419c75b6606cf5d7da429a1279c6493)
@@ -45,9 +45,5 @@
   /* create thread */
  
-  puts( "Init: creating two tasks" );
-  status = pthread_create( &Task_id, NULL, Task_1, NULL );
-  assert( !status );
-  
-  status = pthread_create( &Task2_id, NULL, Task_2, NULL );
+  status = pthread_create( &Task1_id, NULL, Task_1, NULL );
   assert( !status );
   
@@ -57,15 +53,12 @@
 
   puts( "Init: pthread_join - SUCCESSFUL" );
-  status = pthread_join( Task_id, &return_pointer );
-  /* assert is below comment */
+  status = pthread_join( Task1_id, &return_pointer );
 
-     /* switch to Task 1 */
-
-  puts( "Init: returned from pthread_join" );
+  puts( "Init: returned from pthread_join through return" );
   if ( status )
     printf( "status = %d\n", status );
   assert( !status );
 
-  if ( return_pointer == &Task_id )
+  if ( return_pointer == &Task1_id )
     puts( "Init: pthread_join returned correct pointer" );
   else
@@ -73,10 +66,33 @@
       "Init: pthread_join returned incorrect pointer (%p != %p)\n",
       return_pointer,
-      &Task_id
+      &Task1_id
+    );
+  
+  puts( "Init: creating two pthreads" );
+  status = pthread_create( &Task2_id, NULL, Task_2, NULL );
+  assert( !status );
+  
+  status = pthread_create( &Task3_id, NULL, Task_3, NULL );
+  assert( !status );
+  
+  puts( "Init: pthread_join - SUCCESSFUL" );
+  status = pthread_join( Task2_id, &return_pointer );
+  /* assert is below comment */
+
+  puts( "Init: returned from pthread_join through pthread_exit" );
+  if ( status )
+    printf( "status = %d\n", status );
+  assert( !status );
+
+  if ( return_pointer == &Task2_id )
+    puts( "Init: pthread_join returned correct pointer" );
+  else
+    printf(
+      "Init: pthread_join returned incorrect pointer (%p != %p)\n",
+      return_pointer,
+      &Task2_id
     );
   
   puts( "Init: exitting" );
-  pthread_exit( NULL );
-
-  return NULL; /* just so the compiler thinks we returned something */
+  return NULL;
 }
Index: testsuites/psxtests/psx08/psx08.scn
===================================================================
--- testsuites/psxtests/psx08/psx08.scn	(revision 60b791ada1b6fe870f7b1e76a5a80ad17c86a2e8)
+++ testsuites/psxtests/psx08/psx08.scn	(revision 7d9632183419c75b6606cf5d7da429a1279c6493)
@@ -3,16 +3,20 @@
 Init: pthread_detach - ESRCH (invalid id)
 Init: pthread_detach self
-Init: creating two tasks
 Init: pthread_join - ESRCH (invalid id)
 Init: pthread_join - SUCCESSFUL
-Task_1: sleep 1 second
-Task_2: join to Task_1
-Task_1: join to detached task (Init) -- EINVAL
-Task_1: join to self task (Init) -- EDEADLK
 Task_1: exitting
-Init: returned from pthread_join
+Init: returned from pthread_join through return
+Init: pthread_join returned correct pointer
+Init: creating two pthreads
+Init: pthread_join - SUCCESSFUL
+Task_2: sleep 1 second
+Task_3: join to Task_2
+Task_2: join to detached task (Init) -- EINVAL
+Task_2: join to self task (Init) -- EDEADLK
+Task_2: exitting
+Init: returned from pthread_join through pthread_exit
 Init: pthread_join returned correct pointer
 Init: exitting
-Task_2: returned from pthread_join
-Task_2: pthread_join returned correct pointer
+Task_3: returned from pthread_join
+Task_3: pthread_join returned correct pointer
 *** END OF POSIX TEST 8 ***
Index: testsuites/psxtests/psx08/system.h
===================================================================
--- testsuites/psxtests/psx08/system.h	(revision 60b791ada1b6fe870f7b1e76a5a80ad17c86a2e8)
+++ testsuites/psxtests/psx08/system.h	(revision 7d9632183419c75b6606cf5d7da429a1279c6493)
@@ -31,4 +31,8 @@
 );
 
+void *Task_3(
+  void *argument
+);
+
 /* configuration information */
 
@@ -51,6 +55,7 @@
 
 TEST_EXTERN pthread_t        Init_id;
-TEST_EXTERN pthread_t        Task_id;
+TEST_EXTERN pthread_t        Task1_id;
 TEST_EXTERN pthread_t        Task2_id;
+TEST_EXTERN pthread_t        Task3_id;
 
 /* end of include file */
Index: testsuites/psxtests/psx08/task1.c
===================================================================
--- testsuites/psxtests/psx08/task1.c	(revision 7d9632183419c75b6606cf5d7da429a1279c6493)
+++ testsuites/psxtests/psx08/task1.c	(revision 7d9632183419c75b6606cf5d7da429a1279c6493)
@@ -0,0 +1,34 @@
+/*  Task_1
+ *
+ *  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-1998.
+ *  On-Line Applications Research Corporation (OAR).
+ *  Copyright assigned to U.S. Government, 1994.
+ *
+ *  The license and distribution terms for this file may be
+ *  found in the file LICENSE in this distribution or at
+ *  http://www.OARcorp.com/rtems/license.html.
+ *
+ *  $Id$
+ */
+
+#include "system.h"
+#include <errno.h>
+
+void *Task_1(
+  void *argument
+)
+{
+  int   status;
+
+  puts( "Task_1: exitting" );
+
+  return( &Task1_id );
+}
Index: testsuites/psxtests/psx08/task2.c
===================================================================
--- testsuites/psxtests/psx08/task2.c	(revision 60b791ada1b6fe870f7b1e76a5a80ad17c86a2e8)
+++ testsuites/psxtests/psx08/task2.c	(revision 7d9632183419c75b6606cf5d7da429a1279c6493)
@@ -28,24 +28,28 @@
 {
   int   status;
-  void  *return_pointer;
 
-  puts( "Task_2: join to Task_1" );
-  status = pthread_join( Task_id, &return_pointer );
-  puts( "Task_2: returned from pthread_join" );
-  if ( status )
+  puts( "Task_2: sleep 1 second" );
+
+  sleep( 1 );
+
+  /* switch to task 3 */
+
+  puts( "Task_2: join to detached task (Init) -- EINVAL" );
+  status = pthread_join( Init_id, NULL );
+  if ( status != EINVAL )
     printf( "status = %d\n", status );
-  assert( !status );
- 
-  if ( return_pointer == &Task_id )
-    puts( "Task_2: pthread_join returned correct pointer" );
-  else
-    printf(
-      "Task_2: pthread_join returned incorrect pointer (%p != %p)\n",
-      return_pointer,
-      &Task_id
-    );
+  assert( status == EINVAL );
+  
+  puts( "Task_2: join to self task (Init) -- EDEADLK" );
+  status = pthread_join( pthread_self(), NULL );
+  if ( status != EDEADLK )
+    printf( "status = %d\n", status );
+  assert( status == EDEADLK );
 
-  puts( "*** END OF POSIX TEST 8 ***" );
-  exit( 0 );
+  puts( "Task_2: exitting" );
+
+  pthread_exit( &Task2_id );
+
+     /* switch to init task */
 
   return NULL; /* just so the compiler thinks we returned something */
Index: testsuites/psxtests/psx08/task3.c
===================================================================
--- testsuites/psxtests/psx08/task3.c	(revision 7d9632183419c75b6606cf5d7da429a1279c6493)
+++ testsuites/psxtests/psx08/task3.c	(revision 7d9632183419c75b6606cf5d7da429a1279c6493)
@@ -0,0 +1,52 @@
+/*  Task_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-1998.
+ *  On-Line Applications Research Corporation (OAR).
+ *  Copyright assigned to U.S. Government, 1994.
+ *
+ *  The license and distribution terms for this file may be
+ *  found in the file LICENSE in this distribution or at
+ *  http://www.OARcorp.com/rtems/license.html.
+ *
+ *  $Id$
+ */
+
+#include "system.h"
+#include <errno.h>
+
+void *Task_3(
+  void *argument
+)
+{
+  int   status;
+  void  *return_pointer;
+
+  puts( "Task_3: join to Task_2" );
+  status = pthread_join( Task2_id, &return_pointer );
+  puts( "Task_3: returned from pthread_join" );
+  if ( status )
+    printf( "status = %d\n", status );
+  assert( !status );
+ 
+  if ( return_pointer == &Task2_id )
+    puts( "Task_3: pthread_join returned correct pointer" );
+  else
+    printf(
+      "Task_3: pthread_join returned incorrect pointer (%p != %p)\n",
+      return_pointer,
+      &Task2_id
+    );
+
+  puts( "*** END OF POSIX TEST 8 ***" );
+  exit( 0 );
+
+  return NULL; /* just so the compiler thinks we returned something */
+}
