[rtems commit] rtems: Move from <rtems.h> to <rtems/config.h>

Sebastian Huber sebh at rtems.org
Fri Sep 18 16:56:51 UTC 2020


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

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Wed Jun 24 10:36:16 2020 +0200

rtems: Move from <rtems.h> to <rtems/config.h>

Move configuration related declarations and definitions to
<rtems/config.h>.  The goal is to make <rtems.h> an include only header
file.

---

 cpukit/include/rtems.h               | 16 ----------------
 cpukit/include/rtems/config.h        | 17 +++++++++++++++++
 cpukit/sapi/src/getcopyrightnotice.c |  2 +-
 cpukit/sapi/src/getversionstring.c   |  2 +-
 4 files changed, 19 insertions(+), 18 deletions(-)

diff --git a/cpukit/include/rtems.h b/cpukit/include/rtems.h
index 4392f08..6bdca97 100644
--- a/cpukit/include/rtems.h
+++ b/cpukit/include/rtems.h
@@ -62,22 +62,6 @@
 extern "C" {
 #endif
 
-/**
- * @brief Returns the pointer to the RTEMS copyright notice.
- */
-const char *rtems_get_copyright_notice(void);
-
-/**
- * @brief Returns the pointer to the RTEMS version string.
- */
-const char *rtems_get_version_string(void);
-
-/**
- * @brief Indicates whether this processor variant has hardware floating point
- * support.
- */
-#define RTEMS_HAS_HARDWARE_FP CPU_HARDWARE_FP
-
 /**********************************************************************
  *      CONSTANTS WHICH MAY BE USED IN OBJECT NAME TO ID SEARCHES
  **********************************************************************/
diff --git a/cpukit/include/rtems/config.h b/cpukit/include/rtems/config.h
index e82c7ab..1fbcf22 100644
--- a/cpukit/include/rtems/config.h
+++ b/cpukit/include/rtems/config.h
@@ -27,6 +27,7 @@
  *  the configuration table.
  */
 
+#include <rtems/score/cpu.h>
 #include <rtems/score/object.h>
 #include <rtems/score/isr.h>
 #include <rtems/score/memory.h>
@@ -164,6 +165,22 @@ uint32_t rtems_configuration_get_maximum_extensions( void );
 #define rtems_configuration_get_maximum_processors() \
         (_SMP_Processor_configured_maximum)
 
+/**
+ * @brief Returns the pointer to the RTEMS copyright notice.
+ */
+const char *rtems_get_copyright_notice(void);
+
+/**
+ * @brief Returns the pointer to the RTEMS version string.
+ */
+const char *rtems_get_version_string(void);
+
+/**
+ * @brief Indicates whether this processor variant has hardware floating point
+ * support.
+ */
+#define RTEMS_HAS_HARDWARE_FP CPU_HARDWARE_FP
+
 #ifdef __cplusplus
 }
 #endif
diff --git a/cpukit/sapi/src/getcopyrightnotice.c b/cpukit/sapi/src/getcopyrightnotice.c
index 4e5df66..cd60125 100644
--- a/cpukit/sapi/src/getcopyrightnotice.c
+++ b/cpukit/sapi/src/getcopyrightnotice.c
@@ -39,7 +39,7 @@
 
 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
 
-#include <rtems.h>
+#include <rtems/config.h>
 #include <rtems/score/copyrt.h>
 
 const char *rtems_get_copyright_notice( void )
diff --git a/cpukit/sapi/src/getversionstring.c b/cpukit/sapi/src/getversionstring.c
index a036fe2..f8380f7 100644
--- a/cpukit/sapi/src/getversionstring.c
+++ b/cpukit/sapi/src/getversionstring.c
@@ -19,7 +19,7 @@
 #include "config.h"
 #endif
 
-#include <rtems.h>
+#include <rtems/config.h>
 #include <rtems/score/copyrt.h>
 
 const char *rtems_get_version_string(void)



More information about the vc mailing list