Index: testsuites/psxtests/psx09/init.c
===================================================================
--- testsuites/psxtests/psx09/init.c	(revision 9c42752caca6c5136854b499e5e14d2891e0c195)
+++ testsuites/psxtests/psx09/init.c	(revision 5d1fc66ce7b1afccb2537a7acb34ae7eace97f74)
@@ -21,31 +21,20 @@
 const char rtems_test_name[] = "PSX 9";
 
-void print_schedparam(
-  char               *prefix,
-  struct sched_param *schedparam
-);
-
-int HIGH_PRIORITY;
-int MEDIUM_PRIORITY;
-int LOW_PRIORITY;
-
-void print_schedparam(
-  char               *prefix,
-  struct sched_param *schedparam
-)
-{
-  printf( "%ssched priority      = %d\n", prefix, schedparam->sched_priority );
-#if defined(_POSIX_SPORADIC_SERVER)
-  printf( "%ssched_ss_low_priority     = %d\n",
-      prefix, schedparam->sched_ss_low_priority );
-  printf( "%ssched_ss_repl_period = (%" PRIdtime_t ", %ld)\n", prefix,
-     schedparam->sched_ss_repl_period.tv_sec,
-     schedparam->sched_ss_repl_period.tv_nsec );
-  printf( "%ssched_ss_init_budget = (%" PRIdtime_t ", %ld)\n", prefix,
-     schedparam->sched_ss_init_budget.tv_sec,
-     schedparam->sched_ss_init_budget.tv_nsec );
-#else
-  printf( "%s_POSIX_SPORADIC_SERVER is not defined\n", prefix );
-#endif
+static int CEILING_PRIORITY;
+static int HIGH_PRIORITY;
+static int LOW_PRIORITY;
+
+static int get_current_prio( pthread_t thread )
+{
+  rtems_status_code sc;
+  rtems_task_priority prio;
+  int max;
+
+  sc = rtems_task_set_priority( thread, RTEMS_CURRENT_PRIORITY, &prio );
+  rtems_test_assert( sc == RTEMS_SUCCESSFUL );
+
+  max = sched_get_priority_max( SCHED_FIFO );
+
+  return max + 1 - (int) prio;
 }
 
@@ -110,4 +99,8 @@
   TEST_BEGIN();
 
+  CEILING_PRIORITY = sched_get_priority_max( SCHED_SPORADIC );
+  HIGH_PRIORITY = sched_get_priority_max( SCHED_SPORADIC ) - 1;
+  LOW_PRIORITY = sched_get_priority_max( SCHED_SPORADIC ) - 2;
+
   test_destroy_locked_mutex();
 
@@ -136,6 +129,6 @@
   schedparam.sched_ss_init_budget.tv_nsec = 250000000;    /* 1/4 second */
 
-  schedparam.sched_priority = sched_get_priority_max(SCHED_SPORADIC);
-  schedparam.sched_ss_low_priority = sched_get_priority_max(SCHED_SPORADIC) - 2;
+  schedparam.sched_priority = HIGH_PRIORITY;
+  schedparam.sched_ss_low_priority = LOW_PRIORITY;
 
   puts( "Init: pthread_setschedparam - SUCCESSFUL (sporadic server)" );
@@ -143,9 +136,5 @@
   rtems_test_assert( !status );
 
-  status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam );
-  rtems_test_assert( !status );
-
-  priority = schedparam.sched_priority;
-  sprintf( buffer, " - new priority = %d", priority );
+  sprintf( buffer, " - new priority = %d", get_current_prio( pthread_self() ) );
   print_current_time( "Init: ", buffer );
 
@@ -153,9 +142,10 @@
 
   for ( passes=0 ; passes <= 3 ; ) {
-    status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam );
-    rtems_test_assert( !status );
-
-    if ( priority != schedparam.sched_priority ) {
-      priority = schedparam.sched_priority;
+    int current_priority;
+
+    current_priority = get_current_prio( pthread_self() );
+
+    if ( priority != current_priority ) {
+      priority = current_priority;
       sprintf( buffer, " - new priority = %d", priority );
       print_current_time( "Init: ", buffer );
@@ -176,8 +166,4 @@
   schedparam.sched_ss_init_budget.tv_nsec = 250000000;    /* 1/4 second */
 
-  HIGH_PRIORITY = sched_get_priority_max( SCHED_SPORADIC );
-  MEDIUM_PRIORITY = sched_get_priority_max( SCHED_SPORADIC ) - 2;
-  LOW_PRIORITY = sched_get_priority_max( SCHED_SPORADIC ) - 4;
-
   schedparam.sched_priority = HIGH_PRIORITY;
   schedparam.sched_ss_low_priority = LOW_PRIORITY;
@@ -191,5 +177,8 @@
   rtems_test_assert( !status );
 
-  status = pthread_mutexattr_setprotocol( &attr, PTHREAD_PRIO_INHERIT );
+  status = pthread_mutexattr_setprotocol( &attr, PTHREAD_PRIO_PROTECT );
+  rtems_test_assert( !status );
+
+  status = pthread_mutexattr_setprioceiling( &attr, CEILING_PRIORITY );
   rtems_test_assert( !status );
 
@@ -200,9 +189,5 @@
   rtems_test_assert( !status );
 
-  status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam );
-  rtems_test_assert( !status );
-
-  priority = schedparam.sched_priority;
-  sprintf( buffer, " - new priority = %d", priority );
+  sprintf( buffer, " - new priority = %d", get_current_prio( pthread_self() ) );
   print_current_time( "Init: ", buffer );
 
@@ -217,9 +202,8 @@
   rtems_test_assert( !status );
 
-  for ( ; ; ) {
-    status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam );
-    rtems_test_assert( !status );
-
-    if ( schedparam.sched_priority == LOW_PRIORITY ) {
+  do {
+    priority = get_current_prio( pthread_self() );
+
+    if ( priority != CEILING_PRIORITY ) {
       puts( "ERROR - Init's priority lowered while holding mutex" );
       rtems_test_exit(0);
@@ -227,20 +211,5 @@
 
     now = time( &now );
-    if ( now - start > 3 )
-      break;
-
-    priority = schedparam.sched_priority;
-    sprintf( buffer, " - new priority = %d", priority );
-    print_current_time( "Init: ", buffer );
-
-    status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam );
-    rtems_test_assert( !status );
-
-    priority = schedparam.sched_priority;
-    sprintf( buffer, " - new priority = %d", priority );
-    print_current_time( "Init: ", buffer );
-
-    break;
-  }
+  } while ( now - start < 3 );
 
   /* with this unlock we should be able to go to low priority */
@@ -252,24 +221,13 @@
   rtems_test_assert( !status );
 
-  status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam );
-  rtems_test_assert( !status );
-
-  priority = schedparam.sched_priority;
-  sprintf( buffer, " - new priority = %d", priority );
+  sprintf( buffer, " - new priority = %d", get_current_prio( pthread_self() ) );
   print_current_time( "Init: ", buffer );
 
   for ( ; ; ) {
-    status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam );
-    rtems_test_assert( !status );
-
-    if ( schedparam.sched_priority == LOW_PRIORITY )
+    if ( get_current_prio( pthread_self() ) == LOW_PRIORITY )
       break;
   }
 
-  status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam );
-  rtems_test_assert( !status );
-
-  priority = schedparam.sched_priority;
-  sprintf( buffer, " - new priority = %d", priority );
+  sprintf( buffer, " - new priority = %d", get_current_prio( pthread_self() ) );
   print_current_time( "Init: ", buffer );
 
Index: testsuites/psxtests/psx09/psx09.scn
===================================================================
--- testsuites/psxtests/psx09/psx09.scn	(revision 9c42752caca6c5136854b499e5e14d2891e0c195)
+++ testsuites/psxtests/psx09/psx09.scn	(revision 5d1fc66ce7b1afccb2537a7acb34ae7eace97f74)
@@ -1,22 +1,20 @@
-*** POSIX TEST 9 ***
+*** BEGIN OF TEST PSX 9 ***
 Init's ID is 0x0b010001
 Init: pthread_getschedparam - SUCCESSFUL
 Init: Fri May 24 11:05:00 1996 - current priority = 2
 Init: pthread_setschedparam - SUCCESSFUL (sporadic server)
-Init: Fri May 24 11:05:00 1996 - new priority = 254
 Init: Fri May 24 11:05:00 1996 - new priority = 252
-Init: Fri May 24 11:05:00 1996 - new priority = 254
 Init: Fri May 24 11:05:00 1996 - new priority = 252
-Init: Fri May 24 11:05:01 1996 - new priority = 254
+Init: Fri May 24 11:05:00 1996 - new priority = 253
+Init: Fri May 24 11:05:00 1996 - new priority = 252
+Init: Fri May 24 11:05:00 1996 - new priority = 253
 
 Init: pthread_setschedparam - SUCCESSFUL (sporadic server)
 Init: Initializing mutex attributes for priority ceiling
 Init: Creating a mutex
-Init: Fri May 24 11:05:01 1996 - new priority = 254
+Init: Fri May 24 11:05:00 1996 - new priority = 252
 Init: pthread_mutex_lock acquire the lock
-Init: Fri May 24 11:05:01 1996 - new priority = 254
-Init: Fri May 24 11:05:01 1996 - new priority = 254
 Init: unlock mutex
-Init: Fri May 24 11:05:01 1996 - new priority = 254
-Init: Fri May 24 11:05:01 1996 - new priority = 250
-*** END OF POSIX TEST 9 ***
+Init: Fri May 24 11:05:03 1996 - new priority = 253
+Init: Fri May 24 11:05:03 1996 - new priority = 252
+*** END OF TEST PSX 9 **
Index: testsuites/psxtests/psx12/init.c
===================================================================
--- testsuites/psxtests/psx12/init.c	(revision 9c42752caca6c5136854b499e5e14d2891e0c195)
+++ testsuites/psxtests/psx12/init.c	(revision 5d1fc66ce7b1afccb2537a7acb34ae7eace97f74)
@@ -45,14 +45,23 @@
 static test_context test_instance;
 
+static int get_current_prio( pthread_t thread )
+{
+  rtems_status_code sc;
+  rtems_task_priority prio;
+  int max;
+
+  sc = rtems_task_set_priority( thread, RTEMS_CURRENT_PRIORITY, &prio );
+  rtems_test_assert( sc == RTEMS_SUCCESSFUL );
+
+  max = sched_get_priority_max( SCHED_FIFO );
+
+  return max + 1 - (int) prio;
+}
+
 static void wait_for_prio( int prio )
 {
-  int                status;
-  int                policy;
-  struct sched_param param;
-
-  do {
-    status = pthread_getschedparam( pthread_self(), &policy, &param );
-    rtems_test_assert( status == 0 );
-  } while ( prio != param.sched_priority );
+  while ( prio != get_current_prio( pthread_self() ) ) {
+    /* Wait */
+  }
 }
 
