[rtems commit] rtems: Move internal structures to dpmemdata.h

Sebastian Huber sebh at rtems.org
Mon Nov 12 14:38:26 UTC 2018


Module:    rtems
Branch:    master
Commit:    72a4a4298487432ab4eadaa48ac2285eb08711e7
Changeset: http://git.rtems.org/rtems/commit/?id=72a4a4298487432ab4eadaa48ac2285eb08711e7

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Thu Nov  8 10:19:39 2018 +0100

rtems: Move internal structures to dpmemdata.h

Update #3598.

---

 cpukit/headers.am                      |  1 +
 cpukit/include/rtems/confdefs.h        |  1 +
 cpukit/include/rtems/rtems/dpmem.h     | 37 ++--------------------
 cpukit/include/rtems/rtems/dpmemdata.h | 56 ++++++++++++++++++++++++++++++++++
 cpukit/include/rtems/rtems/dpmemimpl.h |  2 +-
 5 files changed, 62 insertions(+), 35 deletions(-)

diff --git a/cpukit/headers.am b/cpukit/headers.am
index 5656ee5..26fa217 100644
--- a/cpukit/headers.am
+++ b/cpukit/headers.am
@@ -234,6 +234,7 @@ include_rtems_rtems_HEADERS += include/rtems/rtems/cache.h
 include_rtems_rtems_HEADERS += include/rtems/rtems/clock.h
 include_rtems_rtems_HEADERS += include/rtems/rtems/config.h
 include_rtems_rtems_HEADERS += include/rtems/rtems/dpmem.h
+include_rtems_rtems_HEADERS += include/rtems/rtems/dpmemdata.h
 include_rtems_rtems_HEADERS += include/rtems/rtems/dpmemimpl.h
 include_rtems_rtems_HEADERS += include/rtems/rtems/event.h
 include_rtems_rtems_HEADERS += include/rtems/rtems/eventimpl.h
diff --git a/cpukit/include/rtems/confdefs.h b/cpukit/include/rtems/confdefs.h
index f485809..2bb9fb0 100644
--- a/cpukit/include/rtems/confdefs.h
+++ b/cpukit/include/rtems/confdefs.h
@@ -33,6 +33,7 @@
 #include <rtems/score/userextimpl.h>
 #include <rtems/score/wkspace.h>
 #include <rtems/rtems/barrierdata.h>
+#include <rtems/rtems/dpmemdata.h>
 #include <rtems/rtems/ratemondata.h>
 #include <rtems/posix/key.h>
 #include <rtems/posix/mqueue.h>
diff --git a/cpukit/include/rtems/rtems/dpmem.h b/cpukit/include/rtems/rtems/dpmem.h
index e582d2d..d3a33ad 100644
--- a/cpukit/include/rtems/rtems/dpmem.h
+++ b/cpukit/include/rtems/rtems/dpmem.h
@@ -1,24 +1,9 @@
 /**
- * @file rtems/rtems/dpmem.h
+ * @file
  *
- * @defgroup ClassicDPMEM Dual Ported Memory
- *
- * @ingroup ClassicRTEMS
- * @brief Dual Ported Memory Manager
- *
- * This include file contains all the constants and structures associated
- * with the Dual Ported Memory Manager. This manager provides a mechanism
- * for converting addresses between internal and external representations
- * for multiple dual-ported memory areas.
- *
- * Directives provided are:
- *
- * - create a port
- * - get ID of a port
- * - delete a port
- * - convert external to internal address
- * - convert internal to external address
+ * @ingroup ClassicDPMEM
  *
+ * @brief Classic Dual Ported Memory Manager API
  */
 
 /* COPYRIGHT (c) 1989-2008.
@@ -50,22 +35,6 @@ extern "C" {
 /**@{*/
 
 /**
- *  The following structure defines the port control block.  Each port
- *  has a control block associated with it.  This control block contains
- *  all information required to support the port related operations.
- */
-typedef struct {
-  /** This field is the object management portion of a Port instance. */
-  Objects_Control  Object;
-  /** This field is the base internal address of the port. */
-  void            *internal_base;
-  /** This field is the base external address of the port. */
-  void            *external_base;
-  /** This field is the length of dual-ported area of the port. */
-  uint32_t         length;
-}   Dual_ported_memory_Control;
-
-/**
  * @brief Creates a port into a dual-ported memory area.
  *
  * This routine implements the rtems_port_create directive. The port
diff --git a/cpukit/include/rtems/rtems/dpmemdata.h b/cpukit/include/rtems/rtems/dpmemdata.h
new file mode 100644
index 0000000..293ad15
--- /dev/null
+++ b/cpukit/include/rtems/rtems/dpmemdata.h
@@ -0,0 +1,56 @@
+/**
+ * @file
+ *
+ * @ingroup ClassicDPMEMImpl
+ *
+ * @brief Classic Dual Ported Memory Manager Data Structures
+ */
+
+/* COPYRIGHT (c) 1989-2008.
+ * On-Line Applications Research Corporation (OAR).
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ */
+
+#ifndef _RTEMS_RTEMS_DPMEMDATA_H
+#define _RTEMS_RTEMS_DPMEMDATA_H
+
+#include <rtems/rtems/dpmem.h>
+#include <rtems/score/object.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @addtogroup ClassicDPMEMImpl
+ *
+ * @{
+ */
+
+/**
+ *  The following structure defines the port control block.  Each port
+ *  has a control block associated with it.  This control block contains
+ *  all information required to support the port related operations.
+ */
+typedef struct {
+  /** This field is the object management portion of a Port instance. */
+  Objects_Control  Object;
+  /** This field is the base internal address of the port. */
+  void            *internal_base;
+  /** This field is the base external address of the port. */
+  void            *external_base;
+  /** This field is the length of dual-ported area of the port. */
+  uint32_t         length;
+}   Dual_ported_memory_Control;
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/* end of include file */
diff --git a/cpukit/include/rtems/rtems/dpmemimpl.h b/cpukit/include/rtems/rtems/dpmemimpl.h
index 52ac48c..2b3fefd 100644
--- a/cpukit/include/rtems/rtems/dpmemimpl.h
+++ b/cpukit/include/rtems/rtems/dpmemimpl.h
@@ -17,7 +17,7 @@
 #ifndef _RTEMS_RTEMS_DPMEM_INL
 #define _RTEMS_RTEMS_DPMEM_INL
 
-#include <rtems/rtems/dpmem.h>
+#include <rtems/rtems/dpmemdata.h>
 #include <rtems/score/objectimpl.h>
 
 #ifdef __cplusplus




More information about the vc mailing list