From 6c2eedc7dd86898dceb9bbbe96b02d94cb468e01 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Mon, 13 May 2013 13:37:06 +0200 Subject: 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(). --- cpukit/sapi/include/rtems/config.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'cpukit/sapi/include/rtems') 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) -- cgit v1.2.3