forked from Imagelibrary/rtems
score: Require power of two CPU_STACK_MINIMUM_SIZE
For most CPU ports this was already the case. This makes it possible to use the size as an object alignment using RTEMS_ALIGNED().
This commit is contained in:
@@ -102,7 +102,7 @@
|
||||
|
||||
#define CPU_PROVIDES_ISR_IS_IN_PROGRESS FALSE
|
||||
|
||||
#define CPU_STACK_MINIMUM_SIZE (1024 * 10)
|
||||
#define CPU_STACK_MINIMUM_SIZE (1024 * 8)
|
||||
|
||||
/* This could be either 4 or 8, depending on the ABI in use.
|
||||
* Could also use __LP64__ or __ILP32__ */
|
||||
|
||||
@@ -228,7 +228,7 @@ typedef struct {
|
||||
*
|
||||
* XXX
|
||||
*/
|
||||
#define CPU_STACK_MINIMUM_SIZE (1536)
|
||||
#define CPU_STACK_MINIMUM_SIZE (2048)
|
||||
|
||||
/**
|
||||
* Size of a pointer.
|
||||
|
||||
@@ -554,7 +554,8 @@ extern Context_Control_fp _CPU_Null_fp_context;
|
||||
* @addtogroup RTEMSScoreCPUExampleContext
|
||||
*
|
||||
* Should be large enough to run all RTEMS tests. This ensures
|
||||
* that a "reasonable" small application should not have any problems.
|
||||
* that a "reasonable" small application should not have any problems. The
|
||||
* size shall be a power of two.
|
||||
*
|
||||
* Port Specific Information:
|
||||
*
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
#include <rtems/score/percpu.h>
|
||||
|
||||
#define PER_CPU_IS_POWER_OF_TWO( value ) \
|
||||
( ( ( ( value ) - 1 ) & ( value ) ) == 0 )
|
||||
( ( value ) > 1 && ( ( ( value ) - 1 ) & ( value ) ) == 0 )
|
||||
|
||||
/*
|
||||
* The minimum alignment of two is due to the Heap Handler which uses the
|
||||
@@ -72,6 +72,11 @@ RTEMS_STATIC_ASSERT(
|
||||
CPU_STACK_ALIGNMENT
|
||||
);
|
||||
|
||||
RTEMS_STATIC_ASSERT(
|
||||
PER_CPU_IS_POWER_OF_TWO( CPU_STACK_MINIMUM_SIZE ),
|
||||
CPU_STACK_MINIMUM_SIZE
|
||||
);
|
||||
|
||||
RTEMS_STATIC_ASSERT(
|
||||
sizeof(void *) == CPU_SIZEOF_POINTER,
|
||||
CPU_SIZEOF_POINTER
|
||||
|
||||
Reference in New Issue
Block a user