Index: cpukit/sapi/src/exinit.c
===================================================================
--- cpukit/sapi/src/exinit.c	(revision 5250ff39f042c09503b61eb81a2c705e9b06b917)
+++ cpukit/sapi/src/exinit.c	(revision ced11f99842a1085e7d26a433b57b5d1fd14f6d2)
@@ -22,36 +22,28 @@
 #include <rtems/system.h>
 #include <rtems/config.h>
-#include <rtems/copyrt.h>
-#include <rtems/clock.h>
-#include <rtems/tasks.h>
 #include <rtems/debug.h>
-#include <rtems/dpmem.h>
-#include <rtems/event.h>
 #include <rtems/extension.h>
 #include <rtems/fatal.h>
-#include <rtems/heap.h>
 #include <rtems/init.h>
-#include <rtems/intthrd.h>
-#include <rtems/isr.h>
-#include <rtems/intr.h>
 #include <rtems/io.h>
-#include <rtems/message.h>
-#include <rtems/mp.h>
-#include <rtems/mpci.h>
-#include <rtems/part.h>
-#include <rtems/priority.h>
-#include <rtems/ratemon.h>
-#include <rtems/region.h>
-#include <rtems/sem.h>
-#include <rtems/signal.h>
 #include <rtems/sysstate.h>
-#include <rtems/thread.h>
-#include <rtems/timer.h>
-#include <rtems/tod.h>
-#include <rtems/userext.h>
-#include <rtems/watchdog.h>
-#include <rtems/wkspace.h>
-
+
+#include <rtems/core/copyrt.h>
+#include <rtems/core/heap.h>
+#include <rtems/core/interr.h>
+#include <rtems/core/intthrd.h>
+#include <rtems/core/isr.h>
+#include <rtems/core/mpci.h>
+#include <rtems/core/priority.h>
+#include <rtems/core/thread.h>
+#include <rtems/core/tod.h>
+#include <rtems/core/userext.h>
+#include <rtems/core/watchdog.h>
+#include <rtems/core/wkspace.h>
+
+#include <rtems/directives.h>
 #include <rtems/sptables.h>
+
+#include <rtems/rtems/rtemsapi.h>
 
 /*PAGE
@@ -104,5 +96,43 @@
   _ISR_Disable( bsp_level );
 
-  _System_state_Set( SYSTEM_STATE_BEFORE_INITIALIZATION );
+  if ( cpu_table == NULL )
+    _Internal_error_Occurred(
+      INTERNAL_ERROR_CORE,
+      TRUE,
+      INTERNAL_ERROR_NO_CONFIGURATION_TABLE
+    );
+
+  /*
+   *  Initialize the system state based on whether this is an MP system.
+   */
+
+  multiprocessing_table = configuration_table->User_multiprocessing_table;
+
+  _System_state_Handler_initialization(
+    (multiprocessing_table) ? TRUE : FALSE
+  );
+
+  /*
+   *  Provided just for user convenience.
+   */
+
+  _Configuration_Table    = configuration_table;
+  _Configuration_MP_table = multiprocessing_table;
+
+  /*
+   *  Internally we view single processor systems as a very restricted
+   *  multiprocessor system.
+   */
+
+  if ( multiprocessing_table == NULL )
+    multiprocessing_table = 
+      (void *)&_Initialization_Default_multiprocessing_table;
+
+  if ( cpu_table == NULL )
+    _Internal_error_Occurred(
+      INTERNAL_ERROR_CORE,
+      TRUE,
+      INTERNAL_ERROR_NO_CPU_TABLE
+    );
 
   _CPU_Initialize( cpu_table, _Thread_Dispatch );
@@ -114,17 +144,4 @@
 
   _Debug_Manager_initialization();
-
-  multiprocessing_table = configuration_table->User_multiprocessing_table;
-  if ( multiprocessing_table == NULL )
-    multiprocessing_table =
-      (void *) &_Configuration_Default_multiprocessing_table;
-
-  _Configuration_Handler_initialization(
-    configuration_table,
-    multiprocessing_table,
-    multiprocessing_table->User_mpci_table
-  );
-
-  _Attributes_Handler_initialization();
 
   _Thread_Dispatch_initialization();
@@ -143,4 +160,5 @@
   _Objects_Handler_initialization(
     multiprocessing_table->node,
+    multiprocessing_table->maximum_nodes,
     multiprocessing_table->maximum_global_objects
   );
@@ -154,18 +172,15 @@
   _Thread_Handler_initialization(
     configuration_table->ticks_per_timeslice,
+    configuration_table->maximum_extensions,
     multiprocessing_table->maximum_proxies
   );
 
-  _MPCI_Handler_initialization();
+  _MPCI_Handler_initialization(
+    multiprocessing_table->User_mpci_table
+  );
+
+  _Internal_threads_Initialization();
 
 /* MANAGERS */
-
-  _Interrupt_Manager_initialization();
-
-  _Multiprocessing_Manager_initialization();
-
-  _RTEMS_tasks_Manager_initialization( configuration_table->maximum_tasks );
-
-  _Timer_Manager_initialization( configuration_table->maximum_timers );
 
   _Extension_Manager_initialization( configuration_table->maximum_extensions );
@@ -173,35 +188,14 @@
   _IO_Manager_initialization(
     configuration_table->Device_driver_table,
-    configuration_table->number_of_device_drivers
-  );
-
-  _Event_Manager_initialization();
-
-  _Message_queue_Manager_initialization(
-    configuration_table->maximum_message_queues
-  );
-
-  _Semaphore_Manager_initialization(
-    configuration_table->maximum_semaphores
-  );
-
-  _Partition_Manager_initialization(
-    configuration_table->maximum_partitions
-  );
-
-  _Region_Manager_initialization( configuration_table->maximum_regions );
-
-  _Dual_ported_memory_Manager_initialization(
-    configuration_table->maximum_ports
-  );
-
-  _Rate_monotonic_Manager_initialization(
-    configuration_table->maximum_periods
-  );
-
-  _Internal_threads_Initialization();
+    configuration_table->number_of_device_drivers,
+    configuration_table->maximum_devices
+  );
+
+  _RTEMS_API_Initialize( configuration_table );
 
   if ( cpu_table->pretasking_hook )
     (*cpu_table->pretasking_hook)();
+
+  _Internal_threads_Start();
 
   _System_state_Set( SYSTEM_STATE_BEFORE_MULTITASKING );
Index: cpukit/sapi/src/extension.c
===================================================================
--- cpukit/sapi/src/extension.c	(revision 5250ff39f042c09503b61eb81a2c705e9b06b917)
+++ cpukit/sapi/src/extension.c	(revision ced11f99842a1085e7d26a433b57b5d1fd14f6d2)
@@ -15,7 +15,7 @@
 
 #include <rtems/system.h>
-#include <rtems/support.h>
-#include <rtems/object.h>
-#include <rtems/thread.h>
+#include <rtems/rtems/support.h>
+#include <rtems/core/object.h>
+#include <rtems/core/thread.h>
 #include <rtems/extension.h>
 
@@ -66,7 +66,7 @@
 
 rtems_status_code rtems_extension_create(
-  rtems_name                     name,
+  rtems_name              name,
   rtems_extensions_table *extension_table,
-  Objects_Id                    *id
+  Objects_Id             *id
 )
 {
@@ -74,5 +74,5 @@
 
   if ( !rtems_is_name_valid( name ) )
-    return ( RTEMS_INVALID_NAME );
+    return RTEMS_INVALID_NAME;
 
   _Thread_Disable_dispatch();         /* to prevent deletion */
@@ -82,5 +82,5 @@
   if ( !the_extension ) {
     _Thread_Enable_dispatch();
-    return( RTEMS_TOO_MANY );
+    return RTEMS_TOO_MANY;
   }
 
@@ -91,5 +91,5 @@
   *id = the_extension->Object.id;
   _Thread_Enable_dispatch();
-  return( RTEMS_SUCCESSFUL );
+  return RTEMS_SUCCESSFUL;
 }
 
@@ -116,10 +116,14 @@
 )
 {
-  return _Objects_Name_to_id(
+  Objects_Name_to_id_errors  status;
+
+  status = _Objects_Name_to_id(
     &_Extension_Information,
     &name,
-    RTEMS_SEARCH_LOCAL_NODE,
+    OBJECTS_SEARCH_LOCAL_NODE,
     id
   );
+
+  return _Status_Object_name_errors_to_status[ status ];
 }
 
@@ -149,5 +153,5 @@
     case OBJECTS_ERROR:
     case OBJECTS_REMOTE:            /* should never return this */
-      return( RTEMS_INVALID_ID );
+      return RTEMS_INVALID_ID;
     case OBJECTS_LOCAL:
       _User_extensions_Remove_set( &the_extension->Extension );
@@ -155,7 +159,7 @@
       _Extension_Free( the_extension );
       _Thread_Enable_dispatch();
-      return( RTEMS_SUCCESSFUL );
+      return RTEMS_SUCCESSFUL;
   }
 
-  return( RTEMS_INTERNAL_ERROR );   /* unreached - only to remove warnings */
+  return RTEMS_INTERNAL_ERROR;   /* unreached - only to remove warnings */
 }
Index: cpukit/sapi/src/fatal.c
===================================================================
--- cpukit/sapi/src/fatal.c	(revision 5250ff39f042c09503b61eb81a2c705e9b06b917)
+++ cpukit/sapi/src/fatal.c	(revision ced11f99842a1085e7d26a433b57b5d1fd14f6d2)
@@ -14,8 +14,6 @@
 
 #include <rtems/system.h>
-#include <rtems/config.h>
 #include <rtems/fatal.h>
-#include <rtems/sysstate.h>
-#include <rtems/userext.h>
+#include <rtems/core/interr.h>
 
 /*PAGE
@@ -23,19 +21,10 @@
  *  rtems_fatal_error_occurred
  *
- *  This directive will invoke the fatal error handler supplied by the user
- *  followed by the the default one provided by the executive.  The default
- *  error handler assumes no hardware is present to help inform the user
- *  of the problem.  Halt stores the error code in a known register,
- *  disables interrupts, and halts the CPU.  If the CPU does not have a
- *  halt instruction, it will loop to itself.
+ *  This directive will invoke the internal fatal error handler.
  *
  *  Input parameters:
  *    the_error - fatal error status code
  *
- *  Output parameters:
- *    the_error       - on stack
- *    status register - on stack
- *
- *  NOTE: The the_error is not necessarily a directive status code.
+ *  Output parameters: NONE
  */
 
@@ -44,10 +33,5 @@
 )
 {
-
-  _User_extensions_Fatal( the_error );
-
-  _System_state_Set( SYSTEM_STATE_FAILED );
-
-  _CPU_Fatal_halt( the_error );
+  _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, FALSE, the_error );
 
 /* will not return from this routine */
Index: cpukit/sapi/src/io.c
===================================================================
--- cpukit/sapi/src/io.c	(revision 5250ff39f042c09503b61eb81a2c705e9b06b917)
+++ cpukit/sapi/src/io.c	(revision ced11f99842a1085e7d26a433b57b5d1fd14f6d2)
@@ -15,9 +15,7 @@
 
 #include <rtems/system.h>
-#include <rtems/config.h>
 #include <rtems/io.h>
-#include <rtems/isr.h>
-#include <rtems/thread.h>
-#include <rtems/intr.h>
+#include <rtems/core/isr.h>
+#include <rtems/core/thread.h>
 
 #include <string.h>
@@ -39,5 +37,5 @@
 
    for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
-     (void) rtems_io_initialize( major, 0, _Configuration_Table);
+     (void) rtems_io_initialize( major, 0, NULL);
 }
 
@@ -61,9 +59,13 @@
     rtems_driver_name_t *np;
     unsigned32 level;
+    unsigned32 index;
 
     /* find an empty slot */
-    for (np = rtems_driver_name_table; np < &rtems_driver_name_table[RTEMS_MAX_DRIVER_NAMES]; np++)
+    for( index=0, np = _IO_Driver_name_table ;
+         index < _IO_Number_of_devices ; 
+         index++, np++ )
     {
-        rtems_interrupt_disable(level);
+
+        _ISR_Disable(level);
         if (np->device_name == 0)
         {
@@ -72,9 +74,9 @@
             np->major = major;
             np->minor = minor;
-            rtems_interrupt_enable(level);
+            _ISR_Enable(level);
 
             return RTEMS_SUCCESSFUL;
         }
-        rtems_interrupt_enable(level);
+        _ISR_Enable(level);
     }
 
@@ -94,11 +96,14 @@
 
 rtems_status_code rtems_io_lookup_name(
-    const char *pathname,
+    const char           *pathname,
     rtems_driver_name_t **rnp
-  )
+)
 {
     rtems_driver_name_t *np;
-
-    for (np = rtems_driver_name_table; np < &rtems_driver_name_table[RTEMS_MAX_DRIVER_NAMES]; np++)
+    unsigned32 index;
+
+    for( index=0, np = _IO_Driver_name_table ;
+         index < _IO_Number_of_devices ; 
+         index++, np++ )
         if (np->device_name)
             if (strncmp(np->device_name, pathname, np->device_name_length) == 0)
Index: cpukit/sapi/src/rtemsapi.c
===================================================================
--- cpukit/sapi/src/rtemsapi.c	(revision ced11f99842a1085e7d26a433b57b5d1fd14f6d2)
+++ cpukit/sapi/src/rtemsapi.c	(revision ced11f99842a1085e7d26a433b57b5d1fd14f6d2)
@@ -0,0 +1,89 @@
+/*
+ *  RTEMS API Support
+ *
+ *  NOTE:
+ *
+ *  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
+ *  On-Line Applications Research Corporation (OAR).
+ *  All rights assigned to U.S. Government, 1994.
+ *
+ *  This material may be reproduced by or for the U.S. Government pursuant
+ *  to the copyright license under the clause at DFARS 252.227-7013.  This
+ *  notice must appear in all copies of this file and its derivatives.
+ *
+ *  $Id$
+ */
+
+#include <rtems/system.h>
+#include <rtems/rtems/status.h>
+#include <rtems/rtems/rtemsapi.h>
+
+#define INIT
+
+#include <rtems/rtems/intr.h>
+#include <rtems/rtems/clock.h>
+#include <rtems/rtems/tasks.h>
+#include <rtems/rtems/dpmem.h>
+#include <rtems/rtems/event.h>
+#include <rtems/rtems/message.h>
+#include <rtems/rtems/mp.h>
+#include <rtems/rtems/part.h>
+#include <rtems/rtems/ratemon.h>
+#include <rtems/rtems/region.h>
+#include <rtems/rtems/sem.h>
+#include <rtems/rtems/signal.h>
+#include <rtems/rtems/timer.h>
+
+/*PAGE
+ *
+ *  _RTEMS_API_Initialize
+ *
+ *  XXX
+ */
+
+void _RTEMS_API_Initialize(
+  rtems_configuration_table *configuration_table
+)
+{
+  _Attributes_Handler_initialization();
+ 
+  _Interrupt_Manager_initialization();
+ 
+  _Multiprocessing_Manager_initialization();
+ 
+  _RTEMS_tasks_Manager_initialization(
+    configuration_table->maximum_tasks,
+    configuration_table->number_of_initialization_tasks,
+    configuration_table->User_initialization_tasks_table
+  );
+ 
+  _Timer_Manager_initialization( configuration_table->maximum_timers );
+ 
+  _Signal_Manager_initialization();
+ 
+  _Event_Manager_initialization();
+ 
+  _Message_queue_Manager_initialization(
+    configuration_table->maximum_message_queues
+  );
+ 
+  _Semaphore_Manager_initialization(
+    configuration_table->maximum_semaphores
+  );
+ 
+  _Partition_Manager_initialization(
+    configuration_table->maximum_partitions
+  );
+ 
+  _Region_Manager_initialization( configuration_table->maximum_regions );
+ 
+  _Dual_ported_memory_Manager_initialization(
+    configuration_table->maximum_ports
+  );
+ 
+  _Rate_monotonic_Manager_initialization(
+    configuration_table->maximum_periods
+  );
+}
+
+/* end of file */
