From 42bb344e495c31988807f2e36d0f56389af5cad8 Mon Sep 17 00:00:00 2001 From: Jennifer Averett Date: Wed, 11 May 2011 14:22:35 +0000 Subject: 2011-05-11 Jennifer Averett * 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. --- cpukit/ChangeLog | 8 ++++++++ cpukit/score/Makefile.am | 9 ++++++++- cpukit/score/include/rtems/score/percpu.h | 5 +++++ cpukit/score/preinstall.am | 3 ++- cpukit/score/src/percpu.c | 5 +++-- cpukit/score/src/threadcreateidle.c | 4 +++- 6 files changed, 29 insertions(+), 5 deletions(-) (limited to 'cpukit') 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 + + * 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 * 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 #endif + + /* + * NOTE: This file MUST be included on non-smp systems as well + * in order to define bsp_smp_processor_id. + */ #include #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 #include #include -#include #include -#include #include #if defined(RTEMS_SMP) + + #include + 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 #include #include -#include +#if defined(RTEMS_SMP) + #include +#endif static inline void _Thread_Create_idle_helper( uint32_t name_u32, -- cgit v1.2.3