diff options
Diffstat (limited to 'cpukit/sapi/include/rtems')
-rw-r--r-- | cpukit/sapi/include/rtems/config.h | 19 |
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) |