[rtems commit] rtems: Create options implementation header

Sebastian Huber sebh at rtems.org
Tue Jul 23 13:09:29 UTC 2013


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

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Tue Jul 23 11:03:13 2013 +0200

rtems: Create options implementation header

Move implementation specific parts of options.h and options.inl into new
header file optionsimpl.h.  The options.h contains now only the
application visible API.

---

 cpukit/rtems/Makefile.am                           |    2 +-
 cpukit/rtems/include/rtems/rtems/options.h         |    8 ++---
 .../rtems/rtems/optionsimpl.h}                     |   30 ++++++++++++-------
 cpukit/rtems/preinstall.am                         |    8 ++--
 cpukit/rtems/src/eventseize.c                      |    1 +
 cpukit/rtems/src/eventsurrender.c                  |    1 +
 cpukit/rtems/src/msgmp.c                           |    2 +-
 cpukit/rtems/src/msgqreceive.c                     |    2 +-
 cpukit/rtems/src/regiongetsegment.c                |    2 +-
 cpukit/rtems/src/regionmp.c                        |    2 +-
 cpukit/rtems/src/semmp.c                           |    2 +-
 cpukit/rtems/src/semobtain.c                       |    2 +-
 12 files changed, 35 insertions(+), 27 deletions(-)

diff --git a/cpukit/rtems/Makefile.am b/cpukit/rtems/Makefile.am
index ebac296..0c9d6d4 100644
--- a/cpukit/rtems/Makefile.am
+++ b/cpukit/rtems/Makefile.am
@@ -30,6 +30,7 @@ include_rtems_rtems_HEADERS += include/rtems/rtems/messageimpl.h
 include_rtems_rtems_HEADERS += include/rtems/rtems/modes.h
 include_rtems_rtems_HEADERS += include/rtems/rtems/object.h
 include_rtems_rtems_HEADERS += include/rtems/rtems/options.h
+include_rtems_rtems_HEADERS += include/rtems/rtems/optionsimpl.h
 include_rtems_rtems_HEADERS += include/rtems/rtems/part.h
 include_rtems_rtems_HEADERS += include/rtems/rtems/ratemon.h
 include_rtems_rtems_HEADERS += include/rtems/rtems/region.h
@@ -67,7 +68,6 @@ include_rtems_rtems_HEADERS += inline/rtems/rtems/dpmem.inl
 include_rtems_rtems_HEADERS += inline/rtems/rtems/event.inl
 include_rtems_rtems_HEADERS += inline/rtems/rtems/eventset.inl
 include_rtems_rtems_HEADERS += inline/rtems/rtems/modes.inl
-include_rtems_rtems_HEADERS += inline/rtems/rtems/options.inl
 include_rtems_rtems_HEADERS += inline/rtems/rtems/part.inl
 include_rtems_rtems_HEADERS += inline/rtems/rtems/ratemon.inl
 include_rtems_rtems_HEADERS += inline/rtems/rtems/region.inl
diff --git a/cpukit/rtems/include/rtems/rtems/options.h b/cpukit/rtems/include/rtems/rtems/options.h
index 29c0351..9f9eb3b 100644
--- a/cpukit/rtems/include/rtems/rtems/options.h
+++ b/cpukit/rtems/include/rtems/rtems/options.h
@@ -21,6 +21,8 @@
 #ifndef _RTEMS_RTEMS_OPTIONS_H
 #define _RTEMS_RTEMS_OPTIONS_H
 
+#include <rtems/score/basedefs.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -71,15 +73,11 @@ typedef uint32_t   rtems_option;
  */
 #define RTEMS_EVENT_ANY 0x00000002
 
-#ifndef __RTEMS_APPLICATION__
-#include <rtems/rtems/options.inl>
-#endif
+/**@}*/
 
 #ifdef __cplusplus
 }
 #endif
 
-/**@}*/
-
 #endif
 /* end of include file */
diff --git a/cpukit/rtems/inline/rtems/rtems/options.inl b/cpukit/rtems/include/rtems/rtems/optionsimpl.h
similarity index 69%
rename from cpukit/rtems/inline/rtems/rtems/options.inl
rename to cpukit/rtems/include/rtems/rtems/optionsimpl.h
index c3c0a5b..e27462f 100644
--- a/cpukit/rtems/inline/rtems/rtems/options.inl
+++ b/cpukit/rtems/include/rtems/rtems/optionsimpl.h
@@ -1,8 +1,9 @@
 /**
- * @file rtems/rtems/options.inl
+ * @file
  *
- *  This file contains the static inline implementation of the inlined
- *  routines from the Options Handler.
+ * @ingroup ClassicOptionsImpl
+ *
+ * @brief Classic Options Implementation
  */
 
 /*  COPYRIGHT (c) 1989-2008.
@@ -13,18 +14,21 @@
  *  http://www.rtems.com/license/LICENSE.
  */
 
-#ifndef _RTEMS_RTEMS_OPTIONS_H
-# error "Never use <rtems/rtems/options.inl> directly; include <rtems/rtems/options.h> instead."
-#endif
+#ifndef _RTEMS_RTEMS_OPTIONSIMPL_H
+#define _RTEMS_RTEMS_OPTIONSIMPL_H
 
-#ifndef _RTEMS_RTEMS_OPTIONS_INL
-#define _RTEMS_RTEMS_OPTIONS_INL
+#include <rtems/rtems/options.h>
 
-#include <rtems/score/basedefs.h> /* RTEMS_INLINE_ROUTINE */
+#ifdef __cplusplus
+extern "C" {
+#endif
 
 /**
- *  @addtogroup ClassicOptions
- *  @{
+ * @defgroup ClassicOptionsImpl Classic Options Implementation
+ *
+ * @ingroup ClassicOptions
+ *
+ * @{
  */
 
 /**
@@ -55,5 +59,9 @@ RTEMS_INLINE_ROUTINE bool _Options_Is_any (
 
 /**@}*/
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif
 /* end of include file */
diff --git a/cpukit/rtems/preinstall.am b/cpukit/rtems/preinstall.am
index 561a825..dca0d85 100644
--- a/cpukit/rtems/preinstall.am
+++ b/cpukit/rtems/preinstall.am
@@ -91,6 +91,10 @@ $(PROJECT_INCLUDE)/rtems/rtems/options.h: include/rtems/rtems/options.h $(PROJEC
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems/options.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems/options.h
 
+$(PROJECT_INCLUDE)/rtems/rtems/optionsimpl.h: include/rtems/rtems/optionsimpl.h $(PROJECT_INCLUDE)/rtems/rtems/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems/optionsimpl.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems/optionsimpl.h
+
 $(PROJECT_INCLUDE)/rtems/rtems/part.h: include/rtems/rtems/part.h $(PROJECT_INCLUDE)/rtems/rtems/$(dirstamp)
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems/part.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems/part.h
@@ -213,10 +217,6 @@ $(PROJECT_INCLUDE)/rtems/rtems/modes.inl: inline/rtems/rtems/modes.inl $(PROJECT
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems/modes.inl
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems/modes.inl
 
-$(PROJECT_INCLUDE)/rtems/rtems/options.inl: inline/rtems/rtems/options.inl $(PROJECT_INCLUDE)/rtems/rtems/$(dirstamp)
-	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems/options.inl
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems/options.inl
-
 $(PROJECT_INCLUDE)/rtems/rtems/part.inl: inline/rtems/rtems/part.inl $(PROJECT_INCLUDE)/rtems/rtems/$(dirstamp)
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems/part.inl
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems/part.inl
diff --git a/cpukit/rtems/src/eventseize.c b/cpukit/rtems/src/eventseize.c
index f7a98ad..be7546f 100644
--- a/cpukit/rtems/src/eventseize.c
+++ b/cpukit/rtems/src/eventseize.c
@@ -19,6 +19,7 @@
 #endif
 
 #include <rtems/rtems/event.h>
+#include <rtems/rtems/optionsimpl.h>
 #include <rtems/score/watchdogimpl.h>
 
 /*
diff --git a/cpukit/rtems/src/eventsurrender.c b/cpukit/rtems/src/eventsurrender.c
index 0f72f5a..9ce5a75 100644
--- a/cpukit/rtems/src/eventsurrender.c
+++ b/cpukit/rtems/src/eventsurrender.c
@@ -19,6 +19,7 @@
 #endif
 
 #include <rtems/rtems/event.h>
+#include <rtems/rtems/optionsimpl.h>
 #include <rtems/score/watchdogimpl.h>
 
 void _Event_Surrender(
diff --git a/cpukit/rtems/src/msgmp.c b/cpukit/rtems/src/msgmp.c
index e6e4a48..a2b49ea 100644
--- a/cpukit/rtems/src/msgmp.c
+++ b/cpukit/rtems/src/msgmp.c
@@ -24,7 +24,7 @@
 #include <rtems/score/mpci.h>
 #include <rtems/rtems/msgmp.h>
 #include <rtems/score/object.h>
-#include <rtems/rtems/options.h>
+#include <rtems/rtems/optionsimpl.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/watchdog.h>
 #include <rtems/rtems/support.h>
diff --git a/cpukit/rtems/src/msgqreceive.c b/cpukit/rtems/src/msgqreceive.c
index 484cb53..7a1a90c 100644
--- a/cpukit/rtems/src/msgqreceive.c
+++ b/cpukit/rtems/src/msgqreceive.c
@@ -33,7 +33,7 @@
 #include <rtems/rtems/status.h>
 #include <rtems/rtems/attr.h>
 #include <rtems/rtems/messageimpl.h>
-#include <rtems/rtems/options.h>
+#include <rtems/rtems/optionsimpl.h>
 #include <rtems/rtems/support.h>
 
 rtems_status_code rtems_message_queue_receive(
diff --git a/cpukit/rtems/src/regiongetsegment.c b/cpukit/rtems/src/regiongetsegment.c
index 8d52ed0..645618a 100644
--- a/cpukit/rtems/src/regiongetsegment.c
+++ b/cpukit/rtems/src/regiongetsegment.c
@@ -22,7 +22,7 @@
 #include <rtems/rtems/status.h>
 #include <rtems/rtems/support.h>
 #include <rtems/score/object.h>
-#include <rtems/rtems/options.h>
+#include <rtems/rtems/optionsimpl.h>
 #include <rtems/rtems/region.h>
 #include <rtems/score/states.h>
 #include <rtems/score/thread.h>
diff --git a/cpukit/rtems/src/regionmp.c b/cpukit/rtems/src/regionmp.c
index 9d2e5fb..e77e0d4 100644
--- a/cpukit/rtems/src/regionmp.c
+++ b/cpukit/rtems/src/regionmp.c
@@ -23,7 +23,7 @@
 #include <rtems/score/mpci.h>
 #include <rtems/score/mppkt.h>
 #include <rtems/score/object.h>
-#include <rtems/rtems/options.h>
+#include <rtems/rtems/optionsimpl.h>
 #include <rtems/rtems/region.h>
 #include <rtems/score/thread.h>
 #include <rtems/rtems/support.h>
diff --git a/cpukit/rtems/src/semmp.c b/cpukit/rtems/src/semmp.c
index 02e1d98..21dfc1e 100644
--- a/cpukit/rtems/src/semmp.c
+++ b/cpukit/rtems/src/semmp.c
@@ -23,7 +23,7 @@
 #include <rtems/score/mpci.h>
 #include <rtems/score/mppkt.h>
 #include <rtems/score/object.h>
-#include <rtems/rtems/options.h>
+#include <rtems/rtems/optionsimpl.h>
 #include <rtems/rtems/semimpl.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/watchdog.h>
diff --git a/cpukit/rtems/src/semobtain.c b/cpukit/rtems/src/semobtain.c
index f29b9b5..8660bce 100644
--- a/cpukit/rtems/src/semobtain.c
+++ b/cpukit/rtems/src/semobtain.c
@@ -24,7 +24,7 @@
 #include <rtems/rtems/attr.h>
 #include <rtems/score/isr.h>
 #include <rtems/score/object.h>
-#include <rtems/rtems/options.h>
+#include <rtems/rtems/optionsimpl.h>
 #include <rtems/rtems/semimpl.h>
 #include <rtems/score/coremuteximpl.h>
 #include <rtems/score/coresemimpl.h>




More information about the vc mailing list