diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-07-18 11:27:39 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-07-22 16:46:01 +0200 |
commit | f913c796ffed8fe19e37f9a4dc914f6dca68baa2 (patch) | |
tree | e2206e3529d92283f701c1bdfba4f7b7c1422d47 /cpukit/sapi/include/rtems/config.h | |
parent | score: Add and use _ISR_Get_nest_level() (diff) | |
download | rtems-f913c796ffed8fe19e37f9a4dc914f6dca68baa2.tar.bz2 |
sapi: Add rtems_configuration_is_smp_enabled()
Add a configuration field which indicates if the SMP mode of operation
is enabled. This can be used to disable features unsupported on SMP,
e.g task variables.
Diffstat (limited to 'cpukit/sapi/include/rtems/config.h')
-rw-r--r-- | cpukit/sapi/include/rtems/config.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/cpukit/sapi/include/rtems/config.h b/cpukit/sapi/include/rtems/config.h index d483471264..d25b905ee2 100644 --- a/cpukit/sapi/include/rtems/config.h +++ b/cpukit/sapi/include/rtems/config.h @@ -222,6 +222,10 @@ typedef struct { */ bool stack_allocator_avoids_work_space; + #ifdef RTEMS_SMP + bool smp_enabled; + #endif + uint32_t maximum_drivers; uint32_t number_of_device_drivers; rtems_driver_address_table *Device_driver_table; @@ -339,11 +343,32 @@ extern const rtems_configuration_table Configuration; #endif /** + * @brief Returns true if the SMP mode of operation is enabled, and false + * otherwise. + * + * On single-processor configurations this is a compile time constant which + * evaluates to false. + * + * @retval true SMP mode of operation is enabled. + * @retval false Otherwise. + */ +#ifdef RTEMS_SMP + #define rtems_configuration_is_smp_enabled() \ + (Configuration.smp_enabled) +#else + #define rtems_configuration_is_smp_enabled() \ + false +#endif + +/** * @brief Returns the configured maximum count of processors. * * The actual number of processors available for the application will be less * than or equal to the configured maximum count of processors. * + * On single-processor configurations this is a compile time constant which + * evaluates to one. + * * @return The configured maximum count of processors. */ #ifdef RTEMS_SMP |