diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2022-09-27 08:52:05 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2022-10-14 07:29:41 +0200 |
commit | 23cdecd8395b75e8a90076898b4d60c546851190 (patch) | |
tree | a90814c643e22d02d90e33f1c6bd539074d12718 /cpukit/score/src/percpuasm.c | |
parent | sptls02: Fix alignment check (diff) | |
download | rtems-23cdecd8395b75e8a90076898b4d60c546851190.tar.bz2 |
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().
Diffstat (limited to '')
-rw-r--r-- | cpukit/score/src/percpuasm.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/cpukit/score/src/percpuasm.c b/cpukit/score/src/percpuasm.c index 6e5a727b76..4bd92be37d 100644 --- a/cpukit/score/src/percpuasm.c +++ b/cpukit/score/src/percpuasm.c @@ -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 @@ -73,6 +73,11 @@ RTEMS_STATIC_ASSERT( ); 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 ); |