diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-03-03 09:23:20 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-03-05 06:58:33 +0100 |
commit | 524839568d8df72bb3d62d64cb1b927bc8dbbbf1 (patch) | |
tree | 1a448dc50f597a98e52f3fb13f705b34bb6ee9ad /cpukit/include/rtems/score/context.h | |
parent | CONFIGURE_MAXIMUM_THREAD_LOCAL_STORAGE_SIZE (diff) | |
download | rtems-524839568d8df72bb3d62d64cb1b927bc8dbbbf1.tar.bz2 |
score: Ensure stack alignment requirement
Make sure that a user-provided stack size is the minimum size allocated
for the stack.
Make sure we meet the stack alignment requirement also for CPU ports
with CPU_STACK_ALIGNMENT > CPU_HEAP_ALIGNMENT.
Diffstat (limited to 'cpukit/include/rtems/score/context.h')
-rw-r--r-- | cpukit/include/rtems/score/context.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/cpukit/include/rtems/score/context.h b/cpukit/include/rtems/score/context.h index 46e04e9600..b65c15e73b 100644 --- a/cpukit/include/rtems/score/context.h +++ b/cpukit/include/rtems/score/context.h @@ -49,8 +49,7 @@ extern "C" { */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #define CONTEXT_FP_SIZE \ - ( ( CPU_CONTEXT_FP_SIZE + CPU_HEAP_ALIGNMENT - 1 ) \ - & ~( CPU_HEAP_ALIGNMENT - 1 ) ) + RTEMS_ALIGN_UP( CPU_CONTEXT_FP_SIZE, CPU_STACK_ALIGNMENT ) #else #define CONTEXT_FP_SIZE 0 #endif |