summaryrefslogtreecommitdiffstats
path: root/cpukit/sapi/include
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/sapi/include')
-rw-r--r--cpukit/sapi/include/confdefs.h13
-rw-r--r--cpukit/sapi/include/rtems/config.h19
2 files changed, 22 insertions, 10 deletions
diff --git a/cpukit/sapi/include/confdefs.h b/cpukit/sapi/include/confdefs.h
index c15c8a385c..2bd1444c18 100644
--- a/cpukit/sapi/include/confdefs.h
+++ b/cpukit/sapi/include/confdefs.h
@@ -2360,22 +2360,15 @@ const rtems_libio_helper rtems_fs_init_helper =
#if defined(RTEMS_MULTIPROCESSING)
CONFIGURE_MULTIPROCESSING_TABLE, /* pointer to MP config table */
#endif
+ #ifdef RTEMS_SMP
+ CONFIGURE_SMP_MAXIMUM_PROCESSORS
+ #endif
};
#endif
#endif /* CONFIGURE_HAS_OWN_CONFIGURATION_TABLE */
#if defined(RTEMS_SMP)
- /**
- * Instantiate the variable which specifies the number of CPUs
- * in an SMP configuration.
- */
- #if defined(CONFIGURE_INIT)
- uint32_t rtems_configuration_smp_maximum_processors = \
- CONFIGURE_SMP_MAXIMUM_PROCESSORS;
- #else
- extern uint32_t rtems_configuration_smp_maximum_processors;
- #endif
/*
* Instantiate the Per CPU information based upon the user configuration.
*/
diff --git a/cpukit/sapi/include/rtems/config.h b/cpukit/sapi/include/rtems/config.h
index 58d2d92fb5..d483471264 100644
--- a/cpukit/sapi/include/rtems/config.h
+++ b/cpukit/sapi/include/rtems/config.h
@@ -230,6 +230,9 @@ typedef struct {
#if defined(RTEMS_MULTIPROCESSING)
rtems_multiprocessing_table *User_multiprocessing_table;
#endif
+ #ifdef RTEMS_SMP
+ uint32_t maximum_processors;
+ #endif
} rtems_configuration_table;
/**
@@ -335,6 +338,22 @@ extern const rtems_configuration_table Configuration;
NULL
#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.
+ *
+ * @return The configured maximum count of processors.
+ */
+#ifdef RTEMS_SMP
+ #define rtems_configuration_get_maximum_processors() \
+ (Configuration.maximum_processors)
+#else
+ #define rtems_configuration_get_maximum_processors() \
+ 1
+#endif
+
#define rtems_configuration_get_rtems_api_configuration() \
(&Configuration_RTEMS_API)