mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-26 18:33:54 +08:00
config: Add _SMP_Processor_configure_maximum
Move the processor maximum configuration constant out of the configuration table. Update #3875.
This commit is contained in:
@@ -2639,16 +2639,18 @@ struct _reent *__getreent(void)
|
||||
const rtems_configuration_table Configuration = {
|
||||
#ifdef RTEMS_SMP
|
||||
#ifdef _CONFIGURE_SMP_APPLICATION
|
||||
true,
|
||||
true
|
||||
#else
|
||||
false,
|
||||
false
|
||||
#endif
|
||||
#endif
|
||||
#ifdef RTEMS_SMP
|
||||
_CONFIGURE_MAXIMUM_PROCESSORS,
|
||||
#endif
|
||||
};
|
||||
|
||||
#ifdef RTEMS_SMP
|
||||
const uint32_t _SMP_Processor_configured_maximum =
|
||||
_CONFIGURE_MAXIMUM_PROCESSORS;
|
||||
#endif
|
||||
|
||||
const uintptr_t _Workspace_Size = CONFIGURE_EXECUTIVE_RAM_SIZE;
|
||||
|
||||
#ifdef CONFIGURE_UNIFIED_WORK_AREAS
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include <rtems/score/object.h>
|
||||
#include <rtems/score/isr.h>
|
||||
#include <rtems/score/memory.h>
|
||||
#include <rtems/score/smp.h>
|
||||
#include <rtems/score/stack.h>
|
||||
#include <rtems/score/userextdata.h>
|
||||
#include <rtems/score/threadidledata.h>
|
||||
@@ -86,10 +87,6 @@ typedef struct {
|
||||
#ifdef RTEMS_SMP
|
||||
bool smp_enabled;
|
||||
#endif
|
||||
|
||||
#ifdef RTEMS_SMP
|
||||
uint32_t maximum_processors;
|
||||
#endif
|
||||
} rtems_configuration_table;
|
||||
|
||||
/**
|
||||
@@ -204,13 +201,8 @@ uint32_t rtems_configuration_get_maximum_extensions( void );
|
||||
*
|
||||
* @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_maximum_processors() \
|
||||
(_SMP_Processor_configured_maximum)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -36,6 +36,19 @@ extern "C" {
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief The configured processor maximum.
|
||||
*
|
||||
* In SMP configurations, this constant is defined by the application
|
||||
* configuration via <rtems/confdefs.h>, otherwise it is a compile-time
|
||||
* constant with the value one.
|
||||
*/
|
||||
#if defined(RTEMS_SMP)
|
||||
extern const uint32_t _SMP_Processor_configured_maximum;
|
||||
#else
|
||||
#define _SMP_Processor_configured_maximum 1
|
||||
#endif
|
||||
|
||||
#if defined( RTEMS_SMP )
|
||||
extern uint32_t _SMP_Processor_maximum;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user