Index: cpukit/posix/src/cond.c
===================================================================
--- cpukit/posix/src/cond.c	(revision c832429dcd6ef347263bcf93d11ac350bb8625dc)
+++ cpukit/posix/src/cond.c	(revision c238a2189d15121d62faa56982cbf17f22bd5b3e)
@@ -143,6 +143,13 @@
     return EINVAL;
 
-  attr->process_shared = pshared;
-  return 0;
+  switch ( pshared ) {
+    case PTHREAD_PROCESS_SHARED:
+    case PTHREAD_PROCESS_PRIVATE:
+      attr->process_shared = pshared;
+      return 0;
+
+    default:
+      return EINVAL;
+  }
 }
  
Index: cpukit/posix/src/mutex.c
===================================================================
--- cpukit/posix/src/mutex.c	(revision c832429dcd6ef347263bcf93d11ac350bb8625dc)
+++ cpukit/posix/src/mutex.c	(revision c238a2189d15121d62faa56982cbf17f22bd5b3e)
@@ -152,6 +152,13 @@
     return EINVAL;
 
-  attr->process_shared = pshared;
-  return 0;
+  switch ( pshared ) {
+    case PTHREAD_PROCESS_SHARED:
+    case PTHREAD_PROCESS_PRIVATE:
+      attr->process_shared = pshared;
+      return 0;
+
+    default:
+      return EINVAL;
+  }
 }
 
@@ -467,6 +474,14 @@
     return EINVAL;
 
-  attr->protocol = protocol;
-  return 0;
+  switch ( protocol ) {
+    case PTHREAD_PRIO_NONE:
+    case PTHREAD_PRIO_INHERIT:
+    case PTHREAD_PRIO_PROTECT:
+      attr->protocol = protocol;
+      return 0;
+ 
+    default:
+      return EINVAL;
+  }
 }
 
Index: cpukit/posix/src/psignal.c
===================================================================
--- cpukit/posix/src/psignal.c	(revision c832429dcd6ef347263bcf93d11ac350bb8625dc)
+++ cpukit/posix/src/psignal.c	(revision c238a2189d15121d62faa56982cbf17f22bd5b3e)
@@ -32,4 +32,10 @@
 )
 {
+  /*
+   *  Only supported for the "calling process" (i.e. this node).
+   */
+ 
+  assert( pid == getpid() );
+
   /* SIGABRT comes from abort via assert */
   if ( sig == SIGABRT ) {
Index: cpukit/posix/src/pthread.c
===================================================================
--- cpukit/posix/src/pthread.c	(revision c832429dcd6ef347263bcf93d11ac350bb8625dc)
+++ cpukit/posix/src/pthread.c	(revision c238a2189d15121d62faa56982cbf17f22bd5b3e)
@@ -81,4 +81,6 @@
  
   deleted->API_Extensions[ THREAD_API_POSIX ] = NULL;
+
+  /* XXX run _POSIX_Keys_Run_destructors here? */
 }
 
@@ -226,11 +228,10 @@
     case PTHREAD_SCOPE_PROCESS:
     case PTHREAD_SCOPE_SYSTEM:
-      break;
+      attr->contentionscope = contentionscope;
+      return 0;
+
     default:
       return EINVAL;
   }
-
-  attr->contentionscope = contentionscope;
-  return 0;
 }
 
@@ -268,11 +269,10 @@
     case PTHREAD_INHERIT_SCHED:
     case PTHREAD_EXPLICIT_SCHED:
-      break;
+      attr->inheritsched = inheritsched;
+      return 0;
+
     default:
       return EINVAL;
   }
-
-  attr->inheritsched = inheritsched;
-  return 0;
 }
 
@@ -307,6 +307,15 @@
     return EINVAL;
 
-  attr->schedpolicy = policy;
-  return 0;
+  switch ( policy ) {
+    case SCHED_OTHER:
+    case SCHED_FIFO:
+    case SCHED_RR:
+    case SCHED_SPORADIC:
+      attr->schedpolicy = policy;
+      return 0;
+ 
+    default:
+      return EINVAL;
+  }
 }
 
@@ -402,7 +411,16 @@
     return EINVAL;
 
-  attr->schedpolicy = policy;
-  attr->schedparam  = *param;
-  return 0;
+  switch ( policy ) {
+    case SCHED_OTHER:
+    case SCHED_FIFO:
+    case SCHED_RR:
+    case SCHED_SPORADIC:
+      attr->schedpolicy = policy;
+      attr->schedparam  = *param;
+      return 0;
+ 
+    default:
+      return EINVAL;
+  }
 }
 
@@ -469,5 +487,5 @@
     return EINVAL;
 
-  if ( stacksize < STACK_MINIMUM_SIZE )
+  if (stacksize < STACK_MINIMUM_SIZE)
     attr->stacksize = STACK_MINIMUM_SIZE;
   else
@@ -540,6 +558,13 @@
     return EINVAL;
 
-  attr->detachstate = detachstate;
-  return 0;
+  switch ( detachstate ) {
+    case PTHREAD_CREATE_DETACHED:
+    case PTHREAD_CREATE_JOINABLE:
+      attr->detachstate = detachstate;
+      return 0;
+ 
+    default:
+      return EINVAL;
+  }
 }
 
@@ -734,4 +759,6 @@
    */
 
+  /* XXX run _POSIX_Keys_Run_destructors here? */
+
   _Thread_Close( &_POSIX_Threads_Information, the_thread );
  
@@ -830,6 +857,13 @@
     return EINVAL;
 
-  attr->cputime_clock_allowed = clock_allowed;
-  return 0;
+  switch ( clock_allowed ) {
+    case CLOCK_ENABLED:
+    case CLOCK_DISABLED:
+      attr->cputime_clock_allowed = clock_allowed;
+      return 0;
+ 
+    default:
+      return EINVAL;
+  }
 }
 
Index: cpukit/posix/src/sched.c
===================================================================
--- cpukit/posix/src/sched.c	(revision c832429dcd6ef347263bcf93d11ac350bb8625dc)
+++ cpukit/posix/src/sched.c	(revision c238a2189d15121d62faa56982cbf17f22bd5b3e)
@@ -49,4 +49,10 @@
 )
 {
+  /*
+   *  Only supported for the "calling process" (i.e. this node).
+   */
+
+  assert( pid == getpid() );
+
   return POSIX_NOT_IMPLEMENTED();
 }
@@ -61,4 +67,10 @@
 )
 {
+  /*
+   *  Only supported for the "calling process" (i.e. this node).
+   */
+
+  assert( pid == getpid() );
+
   return POSIX_NOT_IMPLEMENTED();
 }
@@ -106,8 +118,12 @@
   /* XXX should get for errors? (bad pid) */
 
+  /* XXX some of the time routines also convert usecs to a timespec -- */
+  /* XXX   should this be a common routine? */
+
   us_per_quantum = _TOD_Microseconds_per_tick * _Thread_Ticks_per_timeslice;
 
   interval->tv_sec  = us_per_quantum / TOD_MICROSECONDS_PER_SECOND;
-  interval->tv_nsec = (us_per_quantum % TOD_MICROSECONDS_PER_SECOND) * 1000;
+  interval->tv_nsec = (us_per_quantum % TOD_MICROSECONDS_PER_SECOND) * 
+                         TOD_NANOSECONDS_PER_MICROSECOND;
   return 0;
 }
Index: cpukit/posix/src/types.c
===================================================================
--- cpukit/posix/src/types.c	(revision c832429dcd6ef347263bcf93d11ac350bb8625dc)
+++ cpukit/posix/src/types.c	(revision c238a2189d15121d62faa56982cbf17f22bd5b3e)
@@ -6,4 +6,5 @@
 
 #include <rtems/system.h>
+#include <rtems/score/object.h>
 
 /*PAGE
@@ -14,5 +15,5 @@
 pid_t getpid( void )
 {
-  return POSIX_NOT_IMPLEMENTED();
+  return _Objects_Local_node;
 }
 
