[PATCH 1/9] score: Always provide <rtems/score/smplock.h>

Sebastian Huber sebastian.huber at embedded-brains.de
Mon Jun 10 13:11:49 UTC 2013


---
 cpukit/score/Makefile.am                   |    2 +-
 cpukit/score/include/rtems/score/smplock.h |    6 ++++++
 cpukit/score/preinstall.am                 |    8 ++++----
 3 files changed, 11 insertions(+), 5 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/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
-- 
1.7.7




More information about the devel mailing list