[rtems commit] rtems: Merge support API into one file

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


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

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

rtems: Merge support API into one file

---

 cpukit/rtems/Makefile.am                    |    1 -
 cpukit/rtems/include/rtems/rtems/support.h  |   38 +++++++++++++----
 cpukit/rtems/inline/rtems/rtems/support.inl |   60 ---------------------------
 cpukit/rtems/preinstall.am                  |    4 --
 4 files changed, 30 insertions(+), 73 deletions(-)

diff --git a/cpukit/rtems/Makefile.am b/cpukit/rtems/Makefile.am
index 07fdfa2..c28c82f 100644
--- a/cpukit/rtems/Makefile.am
+++ b/cpukit/rtems/Makefile.am
@@ -71,7 +71,6 @@ include_rtems_rtems_HEADERS += inline/rtems/rtems/eventset.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
-include_rtems_rtems_HEADERS += inline/rtems/rtems/support.inl
 include_rtems_rtems_HEADERS += inline/rtems/rtems/tasks.inl
 include_rtems_rtems_HEADERS += inline/rtems/rtems/timer.inl
 
diff --git a/cpukit/rtems/include/rtems/rtems/support.h b/cpukit/rtems/include/rtems/rtems/support.h
index 335b8c0..e2e01b0 100644
--- a/cpukit/rtems/include/rtems/rtems/support.h
+++ b/cpukit/rtems/include/rtems/rtems/support.h
@@ -18,12 +18,12 @@
 #ifndef _RTEMS_RTEMS_SUPPORT_H
 #define _RTEMS_RTEMS_SUPPORT_H
 
+#include <rtems/rtems/types.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-#include <rtems/rtems/types.h>
-
 /**
  * @addtogroup ClassicRTEMS
  */
@@ -48,6 +48,34 @@ extern "C" {
 #define RTEMS_MICROSECONDS_TO_TICKS(_us) \
        ((_us) / rtems_configuration_get_microseconds_per_tick())
 
+/**
+ * @brief Returns @c true if the name is valid, and @c false otherwise.
+ */
+RTEMS_INLINE_ROUTINE bool rtems_is_name_valid (
+  rtems_name name
+)
+{
+  return ( name != 0 );
+}
+
+/**
+ * @brief Breaks the object name into the four component characters @a c1,
+ * @a c2, @a c3, and @a c4.
+ */
+RTEMS_INLINE_ROUTINE void rtems_name_to_characters(
+  rtems_name    name,
+  char         *c1,
+  char         *c2,
+  char         *c3,
+  char         *c4
+)
+{
+  *c1 = (char) ((name >> 24) & 0xff);
+  *c2 = (char) ((name >> 16) & 0xff);
+  *c3 = (char) ((name >> 8) & 0xff);
+  *c4 = (char) ( name & 0xff);
+}
+
 /** @} */
 
 /**
@@ -134,15 +162,9 @@ void rtems_workspace_greedy_free( void *opaque );
 
 /** @} */
 
-#ifndef __RTEMS_APPLICATION__
-#include <rtems/rtems/support.inl>
-#endif
-
 #ifdef __cplusplus
 }
 #endif
 
-/**@}*/
-
 #endif
 /* end of include file */
diff --git a/cpukit/rtems/inline/rtems/rtems/support.inl b/cpukit/rtems/inline/rtems/rtems/support.inl
deleted file mode 100644
index a302c45..0000000
--- a/cpukit/rtems/inline/rtems/rtems/support.inl
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * @file
- *
- * @ingroup ClassicRTEMS
- *
- * @brief Classic API support.
- */
-
-/*  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.com/license/LICENSE.
- */
- 
-#ifndef _RTEMS_RTEMS_SUPPORT_H
-# error "Never use <rtems/rtems/support.inl> directly; include <rtems/rtems/support.h> instead."
-#endif
-
-#ifndef _RTEMS_RTEMS_SUPPORT_INL
-#define _RTEMS_RTEMS_SUPPORT_INL
-
-/**
- * @addtogroup ClassicRTEMS
- */
-/**@{**/
-
-/**
- * @brief Returns @c true if the name is valid, and @c false otherwise.
- */
-RTEMS_INLINE_ROUTINE bool rtems_is_name_valid (
-  rtems_name name
-)
-{
-  return ( name != 0 );
-}
-
-/**
- * @brief Breaks the object name into the four component characters @a c1,
- * @a c2, @a c3, and @a c4.
- */
-RTEMS_INLINE_ROUTINE void rtems_name_to_characters(
-  rtems_name    name,
-  char         *c1,
-  char         *c2,
-  char         *c3,
-  char         *c4
-)
-{
-  *c1 = (char) ((name >> 24) & 0xff);
-  *c2 = (char) ((name >> 16) & 0xff);
-  *c3 = (char) ((name >> 8) & 0xff);
-  *c4 = (char) ( name & 0xff);
-}
-
-/** @} */
-
-#endif
-/* end of include file */
diff --git a/cpukit/rtems/preinstall.am b/cpukit/rtems/preinstall.am
index cf823b0..e853e92 100644
--- a/cpukit/rtems/preinstall.am
+++ b/cpukit/rtems/preinstall.am
@@ -229,10 +229,6 @@ $(PROJECT_INCLUDE)/rtems/rtems/region.inl: inline/rtems/rtems/region.inl $(PROJE
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems/region.inl
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems/region.inl
 
-$(PROJECT_INCLUDE)/rtems/rtems/support.inl: inline/rtems/rtems/support.inl $(PROJECT_INCLUDE)/rtems/rtems/$(dirstamp)
-	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems/support.inl
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems/support.inl
-
 $(PROJECT_INCLUDE)/rtems/rtems/tasks.inl: inline/rtems/rtems/tasks.inl $(PROJECT_INCLUDE)/rtems/rtems/$(dirstamp)
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems/tasks.inl
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems/tasks.inl




More information about the vc mailing list