summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorJennifer Averett <Jennifer.Averett@OARcorp.com>2011-05-11 14:22:35 +0000
committerJennifer Averett <Jennifer.Averett@OARcorp.com>2011-05-11 14:22:35 +0000
commit42bb344e495c31988807f2e36d0f56389af5cad8 (patch)
treea7e8970bdbe2fba636fb24140e9f0b9209fda4b2 /cpukit
parent2011-05-11 Sebastian Huber <sebastian.huber@embedded-brains.de> (diff)
downloadrtems-42bb344e495c31988807f2e36d0f56389af5cad8.tar.bz2
2011-05-11 Jennifer Averett <Jennifer.Averett@OARcorp.com>
* score/Makefile.am, score/preinstall.am, score/include/rtems/score/percpu.h, score/src/percpu.c, score/src/threadcreateidle.c: Modifications to restrict compilation of SMP only code to when SMP is enabled. Entire SMP specific files are disabled via Makefile.am.
Diffstat (limited to 'cpukit')
-rw-r--r--cpukit/ChangeLog8
-rw-r--r--cpukit/score/Makefile.am9
-rw-r--r--cpukit/score/include/rtems/score/percpu.h5
-rw-r--r--cpukit/score/preinstall.am3
-rw-r--r--cpukit/score/src/percpu.c5
-rw-r--r--cpukit/score/src/threadcreateidle.c4
6 files changed, 29 insertions, 5 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog
index 422ec846ed..ffacf9ba01 100644
--- a/cpukit/ChangeLog
+++ b/cpukit/ChangeLog
@@ -1,3 +1,11 @@
+2011-05-11 Jennifer Averett <Jennifer.Averett@OARcorp.com>
+
+ * score/Makefile.am, score/preinstall.am,
+ score/include/rtems/score/percpu.h, score/src/percpu.c,
+ score/src/threadcreateidle.c: Modifications to restrict compilation
+ of SMP only code to when SMP is enabled. Entire SMP specific files
+ are disabled via Makefile.am.
+
2011-05-11 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libblock/include/rtems/bdbuf.h: Documentation.
diff --git a/cpukit/score/Makefile.am b/cpukit/score/Makefile.am
index bdbc3979a4..2242d82f05 100644
--- a/cpukit/score/Makefile.am
+++ b/cpukit/score/Makefile.am
@@ -36,8 +36,13 @@ include_rtems_score_HEADERS = include/rtems/score/address.h \
include/rtems/score/timestamp64.h include/rtems/score/tod.h \
include/rtems/score/tqdata.h include/rtems/score/userext.h \
include/rtems/score/watchdog.h include/rtems/score/wkspace.h \
- include/rtems/score/cpuopts.h include/rtems/score/basedefs.h \
+ include/rtems/score/cpuopts.h include/rtems/score/basedefs.h
+
+if HAS_SMP
+include_rtems_score_HEADERS += \
include/rtems/score/smplock.h include/rtems/score/smp.h
+endif
+
if HAS_PTHREADS
include_rtems_score_HEADERS += include/rtems/score/corespinlock.h \
@@ -91,7 +96,9 @@ if HAS_MP
libscore_a_SOURCES += src/mpci.c src/objectmp.c src/threadmp.c
endif
+if HAS_SMP
libscore_a_SOURCES += src/smp.c src/smplock.c
+endif
## CORE_APIMUTEX_C_FILES
libscore_a_SOURCES += src/apimutex.c src/apimutexallocate.c \
diff --git a/cpukit/score/include/rtems/score/percpu.h b/cpukit/score/include/rtems/score/percpu.h
index 0c48b50570..929dad2191 100644
--- a/cpukit/score/include/rtems/score/percpu.h
+++ b/cpukit/score/include/rtems/score/percpu.h
@@ -27,6 +27,11 @@
#if defined(RTEMS_SMP)
#include <rtems/score/smplock.h>
#endif
+
+ /*
+ * NOTE: This file MUST be included on non-smp systems as well
+ * in order to define bsp_smp_processor_id.
+ */
#include <rtems/bspsmp.h>
#endif
diff --git a/cpukit/score/preinstall.am b/cpukit/score/preinstall.am
index 831bb5b132..7080f4efef 100644
--- a/cpukit/score/preinstall.am
+++ b/cpukit/score/preinstall.am
@@ -195,6 +195,7 @@ $(PROJECT_INCLUDE)/rtems/score/basedefs.h: include/rtems/score/basedefs.h $(PROJ
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/basedefs.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/basedefs.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
@@ -202,7 +203,7 @@ 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
-
+endif
if HAS_PTHREADS
$(PROJECT_INCLUDE)/rtems/score/corespinlock.h: include/rtems/score/corespinlock.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/corespinlock.h
diff --git a/cpukit/score/src/percpu.c b/cpukit/score/src/percpu.c
index 98eb3a413e..631e662d7e 100644
--- a/cpukit/score/src/percpu.c
+++ b/cpukit/score/src/percpu.c
@@ -17,12 +17,13 @@
#include <rtems/score/thread.h>
#include <rtems/score/percpu.h>
#include <rtems/score/wkspace.h>
-#include <rtems/score/wkspace.h>
#include <rtems/config.h>
-#include <rtems/score/smp.h>
#include <string.h>
#if defined(RTEMS_SMP)
+
+ #include <rtems/score/smp.h>
+
void _SMP_Handler_initialize(void)
{
int cpu;
diff --git a/cpukit/score/src/threadcreateidle.c b/cpukit/score/src/threadcreateidle.c
index c03ea25cf7..e84c41ff4e 100644
--- a/cpukit/score/src/threadcreateidle.c
+++ b/cpukit/score/src/threadcreateidle.c
@@ -30,7 +30,9 @@
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
#include <rtems/config.h>
-#include <rtems/score/smp.h>
+#if defined(RTEMS_SMP)
+ #include <rtems/score/smp.h>
+#endif
static inline void _Thread_Create_idle_helper(
uint32_t name_u32,