Index: c/src/exec/rtems/src/Makefile.in
===================================================================
--- c/src/exec/rtems/src/Makefile.in	(revision 842db5f391f323b49ff2fc6157f89135d4662506)
+++ c/src/exec/rtems/src/Makefile.in	(revision 1dc030fe0566d327c0c0f9ab0c4bfae89a961c9d)
@@ -55,4 +55,8 @@
   part partcreate partdelete partgetbuffer partident partreturnbuffer
 
+DPMEM_PIECES=\
+  dpmem dpmemcreate dpmemdelete dpmemexternal2internal \
+  dpmemident dpmeminternal2external
+
 C_PIECES=\
   attr $(TASK_PIECES) $(RATEMON_PIECES) \
@@ -61,5 +65,5 @@
   $(SEMAPHORE_PIECES) $(MESSAGE_QUEUE_PIECES) \
   $(EVENT_PIECES) signal
-  $(PARTITION_PIECES) $(REGION_PIECES) dpmem \
+  $(PARTITION_PIECES) $(REGION_PIECES) $(DPMEM_PIECES) \
   $(MP_PIECES)
 C_FILES=$(C_PIECES:%=%.c)
Index: c/src/exec/rtems/src/dpmem.c
===================================================================
--- c/src/exec/rtems/src/dpmem.c	(revision 842db5f391f323b49ff2fc6157f89135d4662506)
+++ c/src/exec/rtems/src/dpmem.c	(revision 1dc030fe0566d327c0c0f9ab0c4bfae89a961c9d)
@@ -50,238 +50,2 @@
   );
 }
-
-/*PAGE
- *
- *  rtems_port_create
- *
- *  This directive creates a port into a dual-ported memory area.
- *
- *  Input parameters:
- *    name           - user defined port name
- *    internal_start - internal start address of port
- *    external_start - external start address of port
- *    length         - physical length in bytes
- *    id             - address of port id to set
- *
- *  Output parameters:
- *    id       - port id
- *    RTEMS_SUCCESSFUL - if successful
- *    error code - if unsuccessful
- */
-
-rtems_status_code rtems_port_create(
-  rtems_name    name,
-  void         *internal_start,
-  void         *external_start,
-  unsigned32    length,
-  Objects_Id   *id
-)
-{
-  register Dual_ported_memory_Control *the_port;
-
-  if ( !rtems_is_name_valid( name) )
-    return RTEMS_INVALID_NAME;
-
-  if ( !_Addresses_Is_aligned( internal_start ) ||
-       !_Addresses_Is_aligned( external_start ) )
-    return RTEMS_INVALID_ADDRESS;
-
-  _Thread_Disable_dispatch();             /* to prevent deletion */
-
-  the_port = _Dual_ported_memory_Allocate();
-
-  if ( !the_port ) {
-    _Thread_Enable_dispatch();
-    return RTEMS_TOO_MANY;
-  }
-
-  the_port->internal_base = internal_start;
-  the_port->external_base = external_start;
-  the_port->length        = length - 1;
-
-  _Objects_Open( 
-    &_Dual_ported_memory_Information,
-    &the_port->Object,
-    &name
-  );
-
-  *id = the_port->Object.id;
-  _Thread_Enable_dispatch();
-  return RTEMS_SUCCESSFUL;
-}
-
-/*PAGE
- *
- *  rtems_port_ident
- *
- *  This directive returns the system ID associated with
- *  the port name.
- *
- *  Input parameters:
- *    name - user defined port name
- *    id   - pointer to port id
- *
- *  Output parameters:
- *    *id      - port id
- *    RTEMS_SUCCESSFUL - if successful
- *    error code - if unsuccessful
- */
-
-rtems_status_code rtems_port_ident(
-  rtems_name    name,
-  Objects_Id   *id
-)
-{
-  Objects_Name_to_id_errors  status;
-
-  status = _Objects_Name_to_id(
-    &_Dual_ported_memory_Information,
-    &name,
-    OBJECTS_SEARCH_ALL_NODES,
-    id
-  );
-
-  return _Status_Object_name_errors_to_status[ status ];
-}
-
-/*PAGE
- *
- *  rtems_port_delete
- *
- *  This directive allows a thread to delete a dual-ported memory area
- *  specified by the dual-ported memory identifier.
- *
- *  Input parameters:
- *    id - dual-ported memory area id
- *
- *  Output parameters:
- *    RTEMS_SUCCESSFUL - if successful
- *    error code        - if unsuccessful
- */
-
-rtems_status_code rtems_port_delete(
-  Objects_Id id
-)
-{
-  register Dual_ported_memory_Control *the_port;
-  Objects_Locations                    location;
-
-  the_port = _Dual_ported_memory_Get( id, &location );
-  switch ( location ) {
-    case OBJECTS_REMOTE:        /* this error cannot be returned */
-      return RTEMS_INTERNAL_ERROR;
-
-    case OBJECTS_ERROR:
-      return RTEMS_INVALID_ID;
-
-    case OBJECTS_LOCAL:
-      _Objects_Close( &_Dual_ported_memory_Information, &the_port->Object );
-      _Dual_ported_memory_Free( the_port );
-      _Thread_Enable_dispatch();
-      return RTEMS_SUCCESSFUL;
-  }
-
-  return RTEMS_INTERNAL_ERROR;   /* unreached - only to remove warnings */
-}
-
-/*PAGE
- *
- *  rtems_port_internal_to_external
- *
- *  This directive converts an internal dual-ported memory address to an
- *  external dual-ported memory address.  If the given internal address
- *  is an invalid dual-ported address, then the external address is set
- *  to the given internal address.
- *
- *  Input parameters:
- *    id       - id of dual-ported memory object
- *    internal - internal address to set
- *    external - pointer to external address
- *
- *  Output parameters:
- *    external          - external address
- *    RTEMS_SUCCESSFUL - always succeeds
- */
-
-rtems_status_code rtems_port_internal_to_external(
-  Objects_Id   id,
-  void        *internal,
-  void       **external
-)
-{
-  register Dual_ported_memory_Control *the_port;
-  Objects_Locations                    location;
-  unsigned32                           ending;
-
-  the_port = _Dual_ported_memory_Get( id, &location );
-  switch ( location ) {
-    case OBJECTS_REMOTE:        /* this error cannot be returned */
-      return RTEMS_INTERNAL_ERROR;
-
-    case OBJECTS_ERROR:
-      return RTEMS_INVALID_ID;
-
-    case OBJECTS_LOCAL:
-      ending = _Addresses_Subtract( internal, the_port->internal_base );
-      if ( ending > the_port->length )
-        *external = internal;
-      else
-        *external = _Addresses_Add_offset( the_port->external_base,
-                                           ending );
-      _Thread_Enable_dispatch();
-      return RTEMS_SUCCESSFUL;
-  }
-
-  return RTEMS_INTERNAL_ERROR;   /* unreached - only to remove warnings */
-}
-
-/*PAGE
- *
- *  rtems_port_external_to_internal
- *
- *  This directive converts an external dual-ported memory address to an
- *  internal dual-ported memory address.  If the given external address
- *  is an invalid dual-ported address, then the internal address is set
- *  to the given external address.
- *
- *  Input parameters:
- *    id       - id of dp memory object
- *    external - external address
- *    internal - pointer of internal address to set
- *
- *  Output parameters:
- *    internal          - internal address
- *    RTEMS_SUCCESSFUL - always succeeds
- */
-
-rtems_status_code rtems_port_external_to_internal(
-  Objects_Id   id,
-  void        *external,
-  void       **internal
-)
-{
-  register Dual_ported_memory_Control *the_port;
-  Objects_Locations                    location;
-  unsigned32                           ending;
-
-  the_port = _Dual_ported_memory_Get( id, &location );
-  switch ( location ) {
-    case OBJECTS_REMOTE:        /* this error cannot be returned */
-      return RTEMS_INTERNAL_ERROR;
-
-    case OBJECTS_ERROR:
-      return RTEMS_INVALID_ID;
-
-    case OBJECTS_LOCAL:
-      ending = _Addresses_Subtract( external, the_port->external_base );
-      if ( ending > the_port->length )
-        *internal = external;
-      else
-        *internal = _Addresses_Add_offset( the_port->internal_base,
-                                           ending );
-      _Thread_Enable_dispatch();
-      return RTEMS_SUCCESSFUL;
-  }
-
-  return RTEMS_INTERNAL_ERROR;   /* unreached - only to remove warnings */
-}
Index: c/src/exec/rtems/src/dpmemcreate.c
===================================================================
--- c/src/exec/rtems/src/dpmemcreate.c	(revision 1dc030fe0566d327c0c0f9ab0c4bfae89a961c9d)
+++ c/src/exec/rtems/src/dpmemcreate.c	(revision 1dc030fe0566d327c0c0f9ab0c4bfae89a961c9d)
@@ -0,0 +1,82 @@
+/*
+ *  Dual Port Memory Manager
+ *
+ *  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 <rtems/system.h>
+#include <rtems/rtems/status.h>
+#include <rtems/rtems/support.h>
+#include <rtems/score/address.h>
+#include <rtems/rtems/dpmem.h>
+#include <rtems/score/object.h>
+#include <rtems/score/thread.h>
+#include <rtems/rtems/dpmem.h>
+
+/*PAGE
+ *
+ *  rtems_port_create
+ *
+ *  This directive creates a port into a dual-ported memory area.
+ *
+ *  Input parameters:
+ *    name           - user defined port name
+ *    internal_start - internal start address of port
+ *    external_start - external start address of port
+ *    length         - physical length in bytes
+ *    id             - address of port id to set
+ *
+ *  Output parameters:
+ *    id       - port id
+ *    RTEMS_SUCCESSFUL - if successful
+ *    error code - if unsuccessful
+ */
+
+rtems_status_code rtems_port_create(
+  rtems_name    name,
+  void         *internal_start,
+  void         *external_start,
+  unsigned32    length,
+  Objects_Id   *id
+)
+{
+  register Dual_ported_memory_Control *the_port;
+
+  if ( !rtems_is_name_valid( name) )
+    return RTEMS_INVALID_NAME;
+
+  if ( !_Addresses_Is_aligned( internal_start ) ||
+       !_Addresses_Is_aligned( external_start ) )
+    return RTEMS_INVALID_ADDRESS;
+
+  _Thread_Disable_dispatch();             /* to prevent deletion */
+
+  the_port = _Dual_ported_memory_Allocate();
+
+  if ( !the_port ) {
+    _Thread_Enable_dispatch();
+    return RTEMS_TOO_MANY;
+  }
+
+  the_port->internal_base = internal_start;
+  the_port->external_base = external_start;
+  the_port->length        = length - 1;
+
+  _Objects_Open( 
+    &_Dual_ported_memory_Information,
+    &the_port->Object,
+    &name
+  );
+
+  *id = the_port->Object.id;
+  _Thread_Enable_dispatch();
+  return RTEMS_SUCCESSFUL;
+}
Index: c/src/exec/rtems/src/dpmemdelete.c
===================================================================
--- c/src/exec/rtems/src/dpmemdelete.c	(revision 1dc030fe0566d327c0c0f9ab0c4bfae89a961c9d)
+++ c/src/exec/rtems/src/dpmemdelete.c	(revision 1dc030fe0566d327c0c0f9ab0c4bfae89a961c9d)
@@ -0,0 +1,62 @@
+/*
+ *  Dual Port Memory Manager
+ *
+ *  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 <rtems/system.h>
+#include <rtems/rtems/status.h>
+#include <rtems/rtems/support.h>
+#include <rtems/score/address.h>
+#include <rtems/rtems/dpmem.h>
+#include <rtems/score/object.h>
+#include <rtems/score/thread.h>
+#include <rtems/rtems/dpmem.h>
+
+/*PAGE
+ *
+ *  rtems_port_delete
+ *
+ *  This directive allows a thread to delete a dual-ported memory area
+ *  specified by the dual-ported memory identifier.
+ *
+ *  Input parameters:
+ *    id - dual-ported memory area id
+ *
+ *  Output parameters:
+ *    RTEMS_SUCCESSFUL - if successful
+ *    error code        - if unsuccessful
+ */
+
+rtems_status_code rtems_port_delete(
+  Objects_Id id
+)
+{
+  register Dual_ported_memory_Control *the_port;
+  Objects_Locations                    location;
+
+  the_port = _Dual_ported_memory_Get( id, &location );
+  switch ( location ) {
+    case OBJECTS_REMOTE:        /* this error cannot be returned */
+      return RTEMS_INTERNAL_ERROR;
+
+    case OBJECTS_ERROR:
+      return RTEMS_INVALID_ID;
+
+    case OBJECTS_LOCAL:
+      _Objects_Close( &_Dual_ported_memory_Information, &the_port->Object );
+      _Dual_ported_memory_Free( the_port );
+      _Thread_Enable_dispatch();
+      return RTEMS_SUCCESSFUL;
+  }
+
+  return RTEMS_INTERNAL_ERROR;   /* unreached - only to remove warnings */
+}
Index: c/src/exec/rtems/src/dpmemexternal2internal.c
===================================================================
--- c/src/exec/rtems/src/dpmemexternal2internal.c	(revision 1dc030fe0566d327c0c0f9ab0c4bfae89a961c9d)
+++ c/src/exec/rtems/src/dpmemexternal2internal.c	(revision 1dc030fe0566d327c0c0f9ab0c4bfae89a961c9d)
@@ -0,0 +1,73 @@
+/*
+ *  Dual Port Memory Manager
+ *
+ *  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 <rtems/system.h>
+#include <rtems/rtems/status.h>
+#include <rtems/rtems/support.h>
+#include <rtems/score/address.h>
+#include <rtems/rtems/dpmem.h>
+#include <rtems/score/object.h>
+#include <rtems/score/thread.h>
+#include <rtems/rtems/dpmem.h>
+
+/*PAGE
+ *
+ *  rtems_port_external_to_internal
+ *
+ *  This directive converts an external dual-ported memory address to an
+ *  internal dual-ported memory address.  If the given external address
+ *  is an invalid dual-ported address, then the internal address is set
+ *  to the given external address.
+ *
+ *  Input parameters:
+ *    id       - id of dp memory object
+ *    external - external address
+ *    internal - pointer of internal address to set
+ *
+ *  Output parameters:
+ *    internal          - internal address
+ *    RTEMS_SUCCESSFUL - always succeeds
+ */
+
+rtems_status_code rtems_port_external_to_internal(
+  Objects_Id   id,
+  void        *external,
+  void       **internal
+)
+{
+  register Dual_ported_memory_Control *the_port;
+  Objects_Locations                    location;
+  unsigned32                           ending;
+
+  the_port = _Dual_ported_memory_Get( id, &location );
+  switch ( location ) {
+    case OBJECTS_REMOTE:        /* this error cannot be returned */
+      return RTEMS_INTERNAL_ERROR;
+
+    case OBJECTS_ERROR:
+      return RTEMS_INVALID_ID;
+
+    case OBJECTS_LOCAL:
+      ending = _Addresses_Subtract( external, the_port->external_base );
+      if ( ending > the_port->length )
+        *internal = external;
+      else
+        *internal = _Addresses_Add_offset( the_port->internal_base,
+                                           ending );
+      _Thread_Enable_dispatch();
+      return RTEMS_SUCCESSFUL;
+  }
+
+  return RTEMS_INTERNAL_ERROR;   /* unreached - only to remove warnings */
+}
Index: c/src/exec/rtems/src/dpmemident.c
===================================================================
--- c/src/exec/rtems/src/dpmemident.c	(revision 1dc030fe0566d327c0c0f9ab0c4bfae89a961c9d)
+++ c/src/exec/rtems/src/dpmemident.c	(revision 1dc030fe0566d327c0c0f9ab0c4bfae89a961c9d)
@@ -0,0 +1,56 @@
+/*
+ *  Dual Port Memory Manager
+ *
+ *  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 <rtems/system.h>
+#include <rtems/rtems/status.h>
+#include <rtems/rtems/support.h>
+#include <rtems/score/address.h>
+#include <rtems/rtems/dpmem.h>
+#include <rtems/score/object.h>
+#include <rtems/score/thread.h>
+#include <rtems/rtems/dpmem.h>
+
+/*PAGE
+ *
+ *  rtems_port_ident
+ *
+ *  This directive returns the system ID associated with
+ *  the port name.
+ *
+ *  Input parameters:
+ *    name - user defined port name
+ *    id   - pointer to port id
+ *
+ *  Output parameters:
+ *    *id      - port id
+ *    RTEMS_SUCCESSFUL - if successful
+ *    error code - if unsuccessful
+ */
+
+rtems_status_code rtems_port_ident(
+  rtems_name    name,
+  Objects_Id   *id
+)
+{
+  Objects_Name_to_id_errors  status;
+
+  status = _Objects_Name_to_id(
+    &_Dual_ported_memory_Information,
+    &name,
+    OBJECTS_SEARCH_ALL_NODES,
+    id
+  );
+
+  return _Status_Object_name_errors_to_status[ status ];
+}
Index: c/src/exec/rtems/src/dpmeminternal2external.c
===================================================================
--- c/src/exec/rtems/src/dpmeminternal2external.c	(revision 1dc030fe0566d327c0c0f9ab0c4bfae89a961c9d)
+++ c/src/exec/rtems/src/dpmeminternal2external.c	(revision 1dc030fe0566d327c0c0f9ab0c4bfae89a961c9d)
@@ -0,0 +1,73 @@
+/*
+ *  Dual Port Memory Manager
+ *
+ *  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 <rtems/system.h>
+#include <rtems/rtems/status.h>
+#include <rtems/rtems/support.h>
+#include <rtems/score/address.h>
+#include <rtems/rtems/dpmem.h>
+#include <rtems/score/object.h>
+#include <rtems/score/thread.h>
+#include <rtems/rtems/dpmem.h>
+
+/*PAGE
+ *
+ *  rtems_port_internal_to_external
+ *
+ *  This directive converts an internal dual-ported memory address to an
+ *  external dual-ported memory address.  If the given internal address
+ *  is an invalid dual-ported address, then the external address is set
+ *  to the given internal address.
+ *
+ *  Input parameters:
+ *    id       - id of dual-ported memory object
+ *    internal - internal address to set
+ *    external - pointer to external address
+ *
+ *  Output parameters:
+ *    external          - external address
+ *    RTEMS_SUCCESSFUL - always succeeds
+ */
+
+rtems_status_code rtems_port_internal_to_external(
+  Objects_Id   id,
+  void        *internal,
+  void       **external
+)
+{
+  register Dual_ported_memory_Control *the_port;
+  Objects_Locations                    location;
+  unsigned32                           ending;
+
+  the_port = _Dual_ported_memory_Get( id, &location );
+  switch ( location ) {
+    case OBJECTS_REMOTE:        /* this error cannot be returned */
+      return RTEMS_INTERNAL_ERROR;
+
+    case OBJECTS_ERROR:
+      return RTEMS_INVALID_ID;
+
+    case OBJECTS_LOCAL:
+      ending = _Addresses_Subtract( internal, the_port->internal_base );
+      if ( ending > the_port->length )
+        *external = internal;
+      else
+        *external = _Addresses_Add_offset( the_port->external_base,
+                                           ending );
+      _Thread_Enable_dispatch();
+      return RTEMS_SUCCESSFUL;
+  }
+
+  return RTEMS_INTERNAL_ERROR;   /* unreached - only to remove warnings */
+}
Index: cpukit/rtems/src/dpmem.c
===================================================================
--- cpukit/rtems/src/dpmem.c	(revision 842db5f391f323b49ff2fc6157f89135d4662506)
+++ cpukit/rtems/src/dpmem.c	(revision 1dc030fe0566d327c0c0f9ab0c4bfae89a961c9d)
@@ -50,238 +50,2 @@
   );
 }
-
-/*PAGE
- *
- *  rtems_port_create
- *
- *  This directive creates a port into a dual-ported memory area.
- *
- *  Input parameters:
- *    name           - user defined port name
- *    internal_start - internal start address of port
- *    external_start - external start address of port
- *    length         - physical length in bytes
- *    id             - address of port id to set
- *
- *  Output parameters:
- *    id       - port id
- *    RTEMS_SUCCESSFUL - if successful
- *    error code - if unsuccessful
- */
-
-rtems_status_code rtems_port_create(
-  rtems_name    name,
-  void         *internal_start,
-  void         *external_start,
-  unsigned32    length,
-  Objects_Id   *id
-)
-{
-  register Dual_ported_memory_Control *the_port;
-
-  if ( !rtems_is_name_valid( name) )
-    return RTEMS_INVALID_NAME;
-
-  if ( !_Addresses_Is_aligned( internal_start ) ||
-       !_Addresses_Is_aligned( external_start ) )
-    return RTEMS_INVALID_ADDRESS;
-
-  _Thread_Disable_dispatch();             /* to prevent deletion */
-
-  the_port = _Dual_ported_memory_Allocate();
-
-  if ( !the_port ) {
-    _Thread_Enable_dispatch();
-    return RTEMS_TOO_MANY;
-  }
-
-  the_port->internal_base = internal_start;
-  the_port->external_base = external_start;
-  the_port->length        = length - 1;
-
-  _Objects_Open( 
-    &_Dual_ported_memory_Information,
-    &the_port->Object,
-    &name
-  );
-
-  *id = the_port->Object.id;
-  _Thread_Enable_dispatch();
-  return RTEMS_SUCCESSFUL;
-}
-
-/*PAGE
- *
- *  rtems_port_ident
- *
- *  This directive returns the system ID associated with
- *  the port name.
- *
- *  Input parameters:
- *    name - user defined port name
- *    id   - pointer to port id
- *
- *  Output parameters:
- *    *id      - port id
- *    RTEMS_SUCCESSFUL - if successful
- *    error code - if unsuccessful
- */
-
-rtems_status_code rtems_port_ident(
-  rtems_name    name,
-  Objects_Id   *id
-)
-{
-  Objects_Name_to_id_errors  status;
-
-  status = _Objects_Name_to_id(
-    &_Dual_ported_memory_Information,
-    &name,
-    OBJECTS_SEARCH_ALL_NODES,
-    id
-  );
-
-  return _Status_Object_name_errors_to_status[ status ];
-}
-
-/*PAGE
- *
- *  rtems_port_delete
- *
- *  This directive allows a thread to delete a dual-ported memory area
- *  specified by the dual-ported memory identifier.
- *
- *  Input parameters:
- *    id - dual-ported memory area id
- *
- *  Output parameters:
- *    RTEMS_SUCCESSFUL - if successful
- *    error code        - if unsuccessful
- */
-
-rtems_status_code rtems_port_delete(
-  Objects_Id id
-)
-{
-  register Dual_ported_memory_Control *the_port;
-  Objects_Locations                    location;
-
-  the_port = _Dual_ported_memory_Get( id, &location );
-  switch ( location ) {
-    case OBJECTS_REMOTE:        /* this error cannot be returned */
-      return RTEMS_INTERNAL_ERROR;
-
-    case OBJECTS_ERROR:
-      return RTEMS_INVALID_ID;
-
-    case OBJECTS_LOCAL:
-      _Objects_Close( &_Dual_ported_memory_Information, &the_port->Object );
-      _Dual_ported_memory_Free( the_port );
-      _Thread_Enable_dispatch();
-      return RTEMS_SUCCESSFUL;
-  }
-
-  return RTEMS_INTERNAL_ERROR;   /* unreached - only to remove warnings */
-}
-
-/*PAGE
- *
- *  rtems_port_internal_to_external
- *
- *  This directive converts an internal dual-ported memory address to an
- *  external dual-ported memory address.  If the given internal address
- *  is an invalid dual-ported address, then the external address is set
- *  to the given internal address.
- *
- *  Input parameters:
- *    id       - id of dual-ported memory object
- *    internal - internal address to set
- *    external - pointer to external address
- *
- *  Output parameters:
- *    external          - external address
- *    RTEMS_SUCCESSFUL - always succeeds
- */
-
-rtems_status_code rtems_port_internal_to_external(
-  Objects_Id   id,
-  void        *internal,
-  void       **external
-)
-{
-  register Dual_ported_memory_Control *the_port;
-  Objects_Locations                    location;
-  unsigned32                           ending;
-
-  the_port = _Dual_ported_memory_Get( id, &location );
-  switch ( location ) {
-    case OBJECTS_REMOTE:        /* this error cannot be returned */
-      return RTEMS_INTERNAL_ERROR;
-
-    case OBJECTS_ERROR:
-      return RTEMS_INVALID_ID;
-
-    case OBJECTS_LOCAL:
-      ending = _Addresses_Subtract( internal, the_port->internal_base );
-      if ( ending > the_port->length )
-        *external = internal;
-      else
-        *external = _Addresses_Add_offset( the_port->external_base,
-                                           ending );
-      _Thread_Enable_dispatch();
-      return RTEMS_SUCCESSFUL;
-  }
-
-  return RTEMS_INTERNAL_ERROR;   /* unreached - only to remove warnings */
-}
-
-/*PAGE
- *
- *  rtems_port_external_to_internal
- *
- *  This directive converts an external dual-ported memory address to an
- *  internal dual-ported memory address.  If the given external address
- *  is an invalid dual-ported address, then the internal address is set
- *  to the given external address.
- *
- *  Input parameters:
- *    id       - id of dp memory object
- *    external - external address
- *    internal - pointer of internal address to set
- *
- *  Output parameters:
- *    internal          - internal address
- *    RTEMS_SUCCESSFUL - always succeeds
- */
-
-rtems_status_code rtems_port_external_to_internal(
-  Objects_Id   id,
-  void        *external,
-  void       **internal
-)
-{
-  register Dual_ported_memory_Control *the_port;
-  Objects_Locations                    location;
-  unsigned32                           ending;
-
-  the_port = _Dual_ported_memory_Get( id, &location );
-  switch ( location ) {
-    case OBJECTS_REMOTE:        /* this error cannot be returned */
-      return RTEMS_INTERNAL_ERROR;
-
-    case OBJECTS_ERROR:
-      return RTEMS_INVALID_ID;
-
-    case OBJECTS_LOCAL:
-      ending = _Addresses_Subtract( external, the_port->external_base );
-      if ( ending > the_port->length )
-        *internal = external;
-      else
-        *internal = _Addresses_Add_offset( the_port->internal_base,
-                                           ending );
-      _Thread_Enable_dispatch();
-      return RTEMS_SUCCESSFUL;
-  }
-
-  return RTEMS_INTERNAL_ERROR;   /* unreached - only to remove warnings */
-}
Index: cpukit/rtems/src/dpmemcreate.c
===================================================================
--- cpukit/rtems/src/dpmemcreate.c	(revision 1dc030fe0566d327c0c0f9ab0c4bfae89a961c9d)
+++ cpukit/rtems/src/dpmemcreate.c	(revision 1dc030fe0566d327c0c0f9ab0c4bfae89a961c9d)
@@ -0,0 +1,82 @@
+/*
+ *  Dual Port Memory Manager
+ *
+ *  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 <rtems/system.h>
+#include <rtems/rtems/status.h>
+#include <rtems/rtems/support.h>
+#include <rtems/score/address.h>
+#include <rtems/rtems/dpmem.h>
+#include <rtems/score/object.h>
+#include <rtems/score/thread.h>
+#include <rtems/rtems/dpmem.h>
+
+/*PAGE
+ *
+ *  rtems_port_create
+ *
+ *  This directive creates a port into a dual-ported memory area.
+ *
+ *  Input parameters:
+ *    name           - user defined port name
+ *    internal_start - internal start address of port
+ *    external_start - external start address of port
+ *    length         - physical length in bytes
+ *    id             - address of port id to set
+ *
+ *  Output parameters:
+ *    id       - port id
+ *    RTEMS_SUCCESSFUL - if successful
+ *    error code - if unsuccessful
+ */
+
+rtems_status_code rtems_port_create(
+  rtems_name    name,
+  void         *internal_start,
+  void         *external_start,
+  unsigned32    length,
+  Objects_Id   *id
+)
+{
+  register Dual_ported_memory_Control *the_port;
+
+  if ( !rtems_is_name_valid( name) )
+    return RTEMS_INVALID_NAME;
+
+  if ( !_Addresses_Is_aligned( internal_start ) ||
+       !_Addresses_Is_aligned( external_start ) )
+    return RTEMS_INVALID_ADDRESS;
+
+  _Thread_Disable_dispatch();             /* to prevent deletion */
+
+  the_port = _Dual_ported_memory_Allocate();
+
+  if ( !the_port ) {
+    _Thread_Enable_dispatch();
+    return RTEMS_TOO_MANY;
+  }
+
+  the_port->internal_base = internal_start;
+  the_port->external_base = external_start;
+  the_port->length        = length - 1;
+
+  _Objects_Open( 
+    &_Dual_ported_memory_Information,
+    &the_port->Object,
+    &name
+  );
+
+  *id = the_port->Object.id;
+  _Thread_Enable_dispatch();
+  return RTEMS_SUCCESSFUL;
+}
Index: cpukit/rtems/src/dpmemdelete.c
===================================================================
--- cpukit/rtems/src/dpmemdelete.c	(revision 1dc030fe0566d327c0c0f9ab0c4bfae89a961c9d)
+++ cpukit/rtems/src/dpmemdelete.c	(revision 1dc030fe0566d327c0c0f9ab0c4bfae89a961c9d)
@@ -0,0 +1,62 @@
+/*
+ *  Dual Port Memory Manager
+ *
+ *  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 <rtems/system.h>
+#include <rtems/rtems/status.h>
+#include <rtems/rtems/support.h>
+#include <rtems/score/address.h>
+#include <rtems/rtems/dpmem.h>
+#include <rtems/score/object.h>
+#include <rtems/score/thread.h>
+#include <rtems/rtems/dpmem.h>
+
+/*PAGE
+ *
+ *  rtems_port_delete
+ *
+ *  This directive allows a thread to delete a dual-ported memory area
+ *  specified by the dual-ported memory identifier.
+ *
+ *  Input parameters:
+ *    id - dual-ported memory area id
+ *
+ *  Output parameters:
+ *    RTEMS_SUCCESSFUL - if successful
+ *    error code        - if unsuccessful
+ */
+
+rtems_status_code rtems_port_delete(
+  Objects_Id id
+)
+{
+  register Dual_ported_memory_Control *the_port;
+  Objects_Locations                    location;
+
+  the_port = _Dual_ported_memory_Get( id, &location );
+  switch ( location ) {
+    case OBJECTS_REMOTE:        /* this error cannot be returned */
+      return RTEMS_INTERNAL_ERROR;
+
+    case OBJECTS_ERROR:
+      return RTEMS_INVALID_ID;
+
+    case OBJECTS_LOCAL:
+      _Objects_Close( &_Dual_ported_memory_Information, &the_port->Object );
+      _Dual_ported_memory_Free( the_port );
+      _Thread_Enable_dispatch();
+      return RTEMS_SUCCESSFUL;
+  }
+
+  return RTEMS_INTERNAL_ERROR;   /* unreached - only to remove warnings */
+}
Index: cpukit/rtems/src/dpmemexternal2internal.c
===================================================================
--- cpukit/rtems/src/dpmemexternal2internal.c	(revision 1dc030fe0566d327c0c0f9ab0c4bfae89a961c9d)
+++ cpukit/rtems/src/dpmemexternal2internal.c	(revision 1dc030fe0566d327c0c0f9ab0c4bfae89a961c9d)
@@ -0,0 +1,73 @@
+/*
+ *  Dual Port Memory Manager
+ *
+ *  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 <rtems/system.h>
+#include <rtems/rtems/status.h>
+#include <rtems/rtems/support.h>
+#include <rtems/score/address.h>
+#include <rtems/rtems/dpmem.h>
+#include <rtems/score/object.h>
+#include <rtems/score/thread.h>
+#include <rtems/rtems/dpmem.h>
+
+/*PAGE
+ *
+ *  rtems_port_external_to_internal
+ *
+ *  This directive converts an external dual-ported memory address to an
+ *  internal dual-ported memory address.  If the given external address
+ *  is an invalid dual-ported address, then the internal address is set
+ *  to the given external address.
+ *
+ *  Input parameters:
+ *    id       - id of dp memory object
+ *    external - external address
+ *    internal - pointer of internal address to set
+ *
+ *  Output parameters:
+ *    internal          - internal address
+ *    RTEMS_SUCCESSFUL - always succeeds
+ */
+
+rtems_status_code rtems_port_external_to_internal(
+  Objects_Id   id,
+  void        *external,
+  void       **internal
+)
+{
+  register Dual_ported_memory_Control *the_port;
+  Objects_Locations                    location;
+  unsigned32                           ending;
+
+  the_port = _Dual_ported_memory_Get( id, &location );
+  switch ( location ) {
+    case OBJECTS_REMOTE:        /* this error cannot be returned */
+      return RTEMS_INTERNAL_ERROR;
+
+    case OBJECTS_ERROR:
+      return RTEMS_INVALID_ID;
+
+    case OBJECTS_LOCAL:
+      ending = _Addresses_Subtract( external, the_port->external_base );
+      if ( ending > the_port->length )
+        *internal = external;
+      else
+        *internal = _Addresses_Add_offset( the_port->internal_base,
+                                           ending );
+      _Thread_Enable_dispatch();
+      return RTEMS_SUCCESSFUL;
+  }
+
+  return RTEMS_INTERNAL_ERROR;   /* unreached - only to remove warnings */
+}
Index: cpukit/rtems/src/dpmemident.c
===================================================================
--- cpukit/rtems/src/dpmemident.c	(revision 1dc030fe0566d327c0c0f9ab0c4bfae89a961c9d)
+++ cpukit/rtems/src/dpmemident.c	(revision 1dc030fe0566d327c0c0f9ab0c4bfae89a961c9d)
@@ -0,0 +1,56 @@
+/*
+ *  Dual Port Memory Manager
+ *
+ *  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 <rtems/system.h>
+#include <rtems/rtems/status.h>
+#include <rtems/rtems/support.h>
+#include <rtems/score/address.h>
+#include <rtems/rtems/dpmem.h>
+#include <rtems/score/object.h>
+#include <rtems/score/thread.h>
+#include <rtems/rtems/dpmem.h>
+
+/*PAGE
+ *
+ *  rtems_port_ident
+ *
+ *  This directive returns the system ID associated with
+ *  the port name.
+ *
+ *  Input parameters:
+ *    name - user defined port name
+ *    id   - pointer to port id
+ *
+ *  Output parameters:
+ *    *id      - port id
+ *    RTEMS_SUCCESSFUL - if successful
+ *    error code - if unsuccessful
+ */
+
+rtems_status_code rtems_port_ident(
+  rtems_name    name,
+  Objects_Id   *id
+)
+{
+  Objects_Name_to_id_errors  status;
+
+  status = _Objects_Name_to_id(
+    &_Dual_ported_memory_Information,
+    &name,
+    OBJECTS_SEARCH_ALL_NODES,
+    id
+  );
+
+  return _Status_Object_name_errors_to_status[ status ];
+}
Index: cpukit/rtems/src/dpmeminternal2external.c
===================================================================
--- cpukit/rtems/src/dpmeminternal2external.c	(revision 1dc030fe0566d327c0c0f9ab0c4bfae89a961c9d)
+++ cpukit/rtems/src/dpmeminternal2external.c	(revision 1dc030fe0566d327c0c0f9ab0c4bfae89a961c9d)
@@ -0,0 +1,73 @@
+/*
+ *  Dual Port Memory Manager
+ *
+ *  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 <rtems/system.h>
+#include <rtems/rtems/status.h>
+#include <rtems/rtems/support.h>
+#include <rtems/score/address.h>
+#include <rtems/rtems/dpmem.h>
+#include <rtems/score/object.h>
+#include <rtems/score/thread.h>
+#include <rtems/rtems/dpmem.h>
+
+/*PAGE
+ *
+ *  rtems_port_internal_to_external
+ *
+ *  This directive converts an internal dual-ported memory address to an
+ *  external dual-ported memory address.  If the given internal address
+ *  is an invalid dual-ported address, then the external address is set
+ *  to the given internal address.
+ *
+ *  Input parameters:
+ *    id       - id of dual-ported memory object
+ *    internal - internal address to set
+ *    external - pointer to external address
+ *
+ *  Output parameters:
+ *    external          - external address
+ *    RTEMS_SUCCESSFUL - always succeeds
+ */
+
+rtems_status_code rtems_port_internal_to_external(
+  Objects_Id   id,
+  void        *internal,
+  void       **external
+)
+{
+  register Dual_ported_memory_Control *the_port;
+  Objects_Locations                    location;
+  unsigned32                           ending;
+
+  the_port = _Dual_ported_memory_Get( id, &location );
+  switch ( location ) {
+    case OBJECTS_REMOTE:        /* this error cannot be returned */
+      return RTEMS_INTERNAL_ERROR;
+
+    case OBJECTS_ERROR:
+      return RTEMS_INVALID_ID;
+
+    case OBJECTS_LOCAL:
+      ending = _Addresses_Subtract( internal, the_port->internal_base );
+      if ( ending > the_port->length )
+        *external = internal;
+      else
+        *external = _Addresses_Add_offset( the_port->external_base,
+                                           ending );
+      _Thread_Enable_dispatch();
+      return RTEMS_SUCCESSFUL;
+  }
+
+  return RTEMS_INTERNAL_ERROR;   /* unreached - only to remove warnings */
+}
