[rtems commit] score: Always provide <rtems/score/smplock.h>

Sebastian Huber sebh at rtems.org
Wed Jun 12 14:08:10 UTC 2013


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

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Mon Jun 10 11:12:39 2013 +0200

score: Always provide <rtems/score/smplock.h>

---

 cpukit/score/Makefile.am                   |    2 +-
 cpukit/score/include/rtems/score/percpu.h  |    4 +---
 cpukit/score/include/rtems/score/smplock.h |    6 ++++++
 cpukit/score/preinstall.am                 |    8 ++++----
 4 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/cpukit/score/Makefile.am b/cpukit/score/Makefile.am
index e6c8704..9aa5890 100644
--- a/cpukit/score/Makefile.am
+++ b/cpukit/score/Makefile.am
@@ -40,6 +40,7 @@ include_rtems_score_HEADERS += include/rtems/score/schedulercbs.h
 include_rtems_score_HEADERS += include/rtems/score/scheduleredf.h
 include_rtems_score_HEADERS += include/rtems/score/schedulerpriority.h
 include_rtems_score_HEADERS += include/rtems/score/schedulersimple.h
+include_rtems_score_HEADERS += include/rtems/score/smplock.h
 include_rtems_score_HEADERS += include/rtems/score/stack.h
 include_rtems_score_HEADERS += include/rtems/score/states.h
 include_rtems_score_HEADERS += include/rtems/score/sysstate.h
@@ -62,7 +63,6 @@ include_rtems_score_HEADERS += include/rtems/score/atomic.h
 include_rtems_score_HEADERS += include/rtems/score/genericcpuatomic.h
 include_rtems_score_HEADERS += include/rtems/score/genericatomicops.h
 if HAS_SMP
-include_rtems_score_HEADERS += include/rtems/score/smplock.h
 include_rtems_score_HEADERS += include/rtems/score/smp.h
 endif
 
diff --git a/cpukit/score/include/rtems/score/percpu.h b/cpukit/score/include/rtems/score/percpu.h
index 3b97a68..a91e6dc 100644
--- a/cpukit/score/include/rtems/score/percpu.h
+++ b/cpukit/score/include/rtems/score/percpu.h
@@ -24,9 +24,7 @@
 #else
   #include <rtems/score/isrlevel.h>
   #include <rtems/score/timestamp.h>
-  #if defined(RTEMS_SMP)
-    #include <rtems/score/smplock.h>
-  #endif
+  #include <rtems/score/smplock.h>
 
   /*
    * NOTE: This file MUST be included on non-smp systems as well
diff --git a/cpukit/score/include/rtems/score/smplock.h b/cpukit/score/include/rtems/score/smplock.h
index b3ef0e2..d444d18 100644
--- a/cpukit/score/include/rtems/score/smplock.h
+++ b/cpukit/score/include/rtems/score/smplock.h
@@ -20,6 +20,10 @@
 #ifndef _RTEMS_SCORE_SMPLOCK_H
 #define _RTEMS_SCORE_SMPLOCK_H
 
+#include <rtems/score/cpuopts.h>
+
+#if defined( RTEMS_SMP )
+
 #include <rtems/score/cpusmplock.h>
 #include <rtems/score/isr.h>
 
@@ -120,4 +124,6 @@ static inline void _SMP_lock_Release( SMP_lock_Control *lock )
 }
 #endif /* __cplusplus */
 
+#endif /* defined( RTEMS_SMP ) */
+
 #endif /* _RTEMS_SCORE_SMPLOCK_H */
diff --git a/cpukit/score/preinstall.am b/cpukit/score/preinstall.am
index 6d796e0..2cbbd8c 100644
--- a/cpukit/score/preinstall.am
+++ b/cpukit/score/preinstall.am
@@ -143,6 +143,10 @@ $(PROJECT_INCLUDE)/rtems/score/schedulersimple.h: include/rtems/score/schedulers
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/schedulersimple.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/schedulersimple.h
 
+$(PROJECT_INCLUDE)/rtems/score/smplock.h: include/rtems/score/smplock.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/smplock.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/smplock.h
+
 $(PROJECT_INCLUDE)/rtems/score/stack.h: include/rtems/score/stack.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/stack.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/stack.h
@@ -228,10 +232,6 @@ $(PROJECT_INCLUDE)/rtems/score/genericatomicops.h: include/rtems/score/genericat
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/genericatomicops.h
 
 if HAS_SMP
-$(PROJECT_INCLUDE)/rtems/score/smplock.h: include/rtems/score/smplock.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
-	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/smplock.h
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/smplock.h
-
 $(PROJECT_INCLUDE)/rtems/score/smp.h: include/rtems/score/smp.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/smp.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/smp.h




More information about the vc mailing list