summaryrefslogtreecommitdiffstats
path: root/cpukit/sapi/include/rtems
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2013-05-13 13:37:06 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-05-16 11:44:12 +0200
commit6c2eedc7dd86898dceb9bbbe96b02d94cb468e01 (patch)
tree59237dda2a2eab59ceb8cc209a45d8c3b635ce09 /cpukit/sapi/include/rtems
parentfstests/fsstatvfs: Fix end of test message (diff)
downloadrtems-6c2eedc7dd86898dceb9bbbe96b02d94cb468e01.tar.bz2
smp: Add maximum_processors field to config
Delete rtems_configuration_get_smp_maximum_processors(). Delete rtems_configuration_smp_maximum_processors variable. Add maximum_processors field to rtems_configuration_table if RTEMS_SMP is defined. Add rtems_configuration_get_maximum_processors().
Diffstat (limited to 'cpukit/sapi/include/rtems')
-rw-r--r--cpukit/sapi/include/rtems/config.h19
1 files changed, 19 insertions, 0 deletions
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)