[PATCH 13/21] rtems: Move internal structures to extensiondata.h
Sebastian Huber
sebastian.huber at embedded-brains.de
Thu Nov 8 12:52:06 UTC 2018
Update #3598.
---
cpukit/headers.am | 1 +
cpukit/include/rtems/confdefs.h | 1 +
cpukit/include/rtems/extension.h | 12 +++------
cpukit/include/rtems/extensiondata.h | 46 ++++++++++++++++++++++++++++++++++
cpukit/include/rtems/extensionimpl.h | 16 +++++++++---
cpukit/libmisc/monitor/mon-extension.c | 1 +
6 files changed, 66 insertions(+), 11 deletions(-)
create mode 100644 cpukit/include/rtems/extensiondata.h
diff --git a/cpukit/headers.am b/cpukit/headers.am
index 0ca35265b8..8657f99d5a 100644
--- a/cpukit/headers.am
+++ b/cpukit/headers.am
@@ -91,6 +91,7 @@ include_rtems_HEADERS += include/rtems/dumpbuf.h
include_rtems_HEADERS += include/rtems/endian.h
include_rtems_HEADERS += include/rtems/error.h
include_rtems_HEADERS += include/rtems/extension.h
+include_rtems_HEADERS += include/rtems/extensiondata.h
include_rtems_HEADERS += include/rtems/extensionimpl.h
include_rtems_HEADERS += include/rtems/fatal.h
include_rtems_HEADERS += include/rtems/fb.h
diff --git a/cpukit/include/rtems/confdefs.h b/cpukit/include/rtems/confdefs.h
index d91b00a63e..e884289e2c 100644
--- a/cpukit/include/rtems/confdefs.h
+++ b/cpukit/include/rtems/confdefs.h
@@ -26,6 +26,7 @@
* Include the executive's configuration
*/
#include <rtems.h>
+#include <rtems/extensiondata.h>
#include <rtems/ioimpl.h>
#include <rtems/sysinit.h>
#include <rtems/score/apimutex.h>
diff --git a/cpukit/include/rtems/extension.h b/cpukit/include/rtems/extension.h
index cfbf061677..da219acb33 100644
--- a/cpukit/include/rtems/extension.h
+++ b/cpukit/include/rtems/extension.h
@@ -1,6 +1,8 @@
/**
* @file
- *
+ *
+ * @ingroup ClassicUserExtensions
+ *
* @brief User Extensions API.
*/
@@ -16,20 +18,14 @@
#ifndef _RTEMS_EXTENSION_H
#define _RTEMS_EXTENSION_H
-#include <rtems/score/object.h>
-#include <rtems/score/userext.h>
#include <rtems/rtems/status.h>
#include <rtems/rtems/types.h>
+#include <rtems/score/userext.h>
#ifdef __cplusplus
extern "C" {
#endif
-typedef struct {
- Objects_Control Object;
- User_extensions_Control Extension;
-} Extension_Control;
-
typedef User_extensions_routine
rtems_extension RTEMS_DEPRECATED;
diff --git a/cpukit/include/rtems/extensiondata.h b/cpukit/include/rtems/extensiondata.h
new file mode 100644
index 0000000000..ba32a2b319
--- /dev/null
+++ b/cpukit/include/rtems/extensiondata.h
@@ -0,0 +1,46 @@
+/**
+ * @file
+ *
+ * @ingroup ClassicUserExtensionsImpl
+ *
+ * @brief Classic User Extensions 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_EXTENSIONDATA_H
+#define _RTEMS_EXTENSIONDATA_H
+
+#include <rtems/extension.h>
+#include <rtems/score/object.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @addtogroup ClassicUserExtensionsImpl
+ *
+ * @{
+ */
+
+typedef struct {
+ Objects_Control Object;
+ User_extensions_Control Extension;
+} Extension_Control;
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/* end of include file */
diff --git a/cpukit/include/rtems/extensionimpl.h b/cpukit/include/rtems/extensionimpl.h
index fb4eeaff7c..fd71d530ae 100644
--- a/cpukit/include/rtems/extensionimpl.h
+++ b/cpukit/include/rtems/extensionimpl.h
@@ -1,9 +1,9 @@
/**
* @file
*
- * @ingroup ClassicUserExtensions
+ * @ingroup ClassicUserExtensionsImpl
*
- * @brief User Extensions API
+ * @brief Classic User Extensions Implementation
*/
/*
@@ -18,13 +18,21 @@
#ifndef _RTEMS_EXTENSIONIMPL_H
#define _RTEMS_EXTENSIONIMPL_H
-#include <rtems/extension.h>
+#include <rtems/extensiondata.h>
#include <rtems/score/objectimpl.h>
#ifdef __cplusplus
extern "C" {
#endif
+/**
+ * @defgroup ClassicUserExtensionsImpl User Extensions Implementation
+ *
+ * @ingroup ClassicUserExtensions
+ *
+ * @{
+ */
+
extern Objects_Information _Extension_Information;
RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Allocate( void )
@@ -45,6 +53,8 @@ RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Get( Objects_Id id )
_Objects_Get_no_protection( id, &_Extension_Information );
}
+/** @} */
+
#ifdef __cplusplus
}
#endif
diff --git a/cpukit/libmisc/monitor/mon-extension.c b/cpukit/libmisc/monitor/mon-extension.c
index 89d7170ced..029d26c4c1 100644
--- a/cpukit/libmisc/monitor/mon-extension.c
+++ b/cpukit/libmisc/monitor/mon-extension.c
@@ -7,6 +7,7 @@
#endif
#include <rtems.h>
+#include <rtems/extensiondata.h>
#include <rtems/monitor.h>
#include <stdio.h>
--
2.16.4
More information about the devel
mailing list