From 22ce0881915cff33652a896907fa76a4040648da Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Thu, 7 Aug 2008 18:23:48 +0000 Subject: [PATCH] 2008-08-07 Joel Sherrill * score/include/rtems/score/sysstate.h, score/inline/rtems/score/sysstate.inl, score/src/thread.c: Make _System_state_Is_multiprocessing unused when multiprocessing is not enabled. Saves one more variable from single processor configuration. --- cpukit/ChangeLog | 7 +++++++ cpukit/score/include/rtems/score/sysstate.h | 2 ++ cpukit/score/inline/rtems/score/sysstate.inl | 4 +++- cpukit/score/src/thread.c | 4 ++++ 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index 4f4f1f9391..9d3dea1573 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,10 @@ +2008-08-07 Joel Sherrill + + * score/include/rtems/score/sysstate.h, + score/inline/rtems/score/sysstate.inl, score/src/thread.c: Make + _System_state_Is_multiprocessing unused when multiprocessing is not + enabled. Saves one more variable from single processor configuration. + 2008-08-07 Chris Johns * libcsupport/src/_rename_r.c: Fixed return code bug. Add a check diff --git a/cpukit/score/include/rtems/score/sysstate.h b/cpukit/score/include/rtems/score/sysstate.h index fa53602688..31b1eab084 100644 --- a/cpukit/score/include/rtems/score/sysstate.h +++ b/cpukit/score/include/rtems/score/sysstate.h @@ -64,11 +64,13 @@ typedef enum { /** This defines the highest value system state. */ #define SYSTEM_STATE_CODES_LAST SYSTEM_STATE_FAILED +#if defined(RTEMS_MULTIPROCESSING) /** * The following variable indicates whether or not this is * an multiprocessing system. */ SCORE_EXTERN boolean _System_state_Is_multiprocessing; +#endif /** * The following variable contains the current system state. diff --git a/cpukit/score/inline/rtems/score/sysstate.inl b/cpukit/score/inline/rtems/score/sysstate.inl index a786c40476..28e59c0416 100644 --- a/cpukit/score/inline/rtems/score/sysstate.inl +++ b/cpukit/score/inline/rtems/score/sysstate.inl @@ -33,7 +33,9 @@ RTEMS_INLINE_ROUTINE void _System_state_Handler_initialization ( ) { _System_state_Current = SYSTEM_STATE_BEFORE_INITIALIZATION; - _System_state_Is_multiprocessing = is_multiprocessing; + #if defined(RTEMS_MULTIPROCESSING) + _System_state_Is_multiprocessing = is_multiprocessing; + #endif } /** diff --git a/cpukit/score/src/thread.c b/cpukit/score/src/thread.c index a8032598d2..31e1d31b86 100644 --- a/cpukit/score/src/thread.c +++ b/cpukit/score/src/thread.c @@ -99,7 +99,11 @@ void _Thread_Handler_initialization( &_Thread_Internal_information, OBJECTS_INTERNAL_API, OBJECTS_INTERNAL_THREADS, +#if defined(RTEMS_MULTIPROCESSING) ( _System_state_Is_multiprocessing ) ? 2 : 1, +#else + 1, +#endif sizeof( Thread_Control ), /* size of this object's control block */ TRUE, /* TRUE if names for this object are strings */