[rtems commit] rtems: Move internal structures to extensiondata.h
Sebastian Huber
sebh at rtems.org
Mon Nov 12 14:39:33 UTC 2018
Module: rtems
Branch: master
Commit: 5fc855d96059236268e9b3a93fd79f2e91a4a8e4
Changeset: http://git.rtems.org/rtems/commit/?id=5fc855d96059236268e9b3a93fd79f2e91a4a8e4
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Thu Nov 8 13:17:37 2018 +0100
rtems: Move internal structures to extensiondata.h
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(-)
diff --git a/cpukit/headers.am b/cpukit/headers.am
index 0ca3526..8657f99 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 d91b00a..e884289 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 cfbf061..da219ac 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 0000000..ba32a2b
--- /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 fb4eeaf..fd71d53 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 89d7170..029d26c 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>
More information about the vc
mailing list