diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-03-03 09:36:45 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-03-05 06:58:33 +0100 |
commit | 1de00d685d4ad5af7c6b09711b34369dc7d31bae (patch) | |
tree | 0a6e8c8df435d09dfe0fee5c528acf1ce77e01bc /cpukit | |
parent | validation: Fix for 64-bit targets (diff) | |
download | rtems-1de00d685d4ad5af7c6b09711b34369dc7d31bae.tar.bz2 |
CONFIGURE_MAXIMUM_THREAD_LOCAL_STORAGE_SIZE
Ensure that CONFIGURE_MAXIMUM_THREAD_LOCAL_STORAGE_SIZE meets the task
storage alignment requirement.
Diffstat (limited to 'cpukit')
-rw-r--r-- | cpukit/doxygen/appl-config.h | 14 | ||||
-rw-r--r-- | cpukit/include/rtems/confdefs/threads.h | 5 |
2 files changed, 16 insertions, 3 deletions
diff --git a/cpukit/doxygen/appl-config.h b/cpukit/doxygen/appl-config.h index 092e02ccca..4b18ac29a7 100644 --- a/cpukit/doxygen/appl-config.h +++ b/cpukit/doxygen/appl-config.h @@ -887,9 +887,17 @@ * The default value is 0. * * @par Value Constraints - * The value of this configuration option shall be greater than or equal to 0 - * and less than or equal to <a - * href="https://en.cppreference.com/w/c/types/limits">SIZE_MAX</a>. + * @parblock + * The value of this configuration option shall satisfy all of the following + * constraints: + * + * * It shall be greater than or equal to 0. + * + * * It shall be less than or equal to <a + * href="https://en.cppreference.com/w/c/types/limits">SIZE_MAX</a>. + * + * * It shall be an integral multiple of #RTEMS_TASK_STORAGE_ALIGNMENT. + * @endparblock * * @par Notes * @parblock diff --git a/cpukit/include/rtems/confdefs/threads.h b/cpukit/include/rtems/confdefs/threads.h index 97508068e2..279c6264db 100644 --- a/cpukit/include/rtems/confdefs/threads.h +++ b/cpukit/include/rtems/confdefs/threads.h @@ -138,6 +138,11 @@ typedef union { const size_t _Thread_Maximum_name_size = CONFIGURE_MAXIMUM_THREAD_NAME_SIZE; +RTEMS_STATIC_ASSERT( + CONFIGURE_MAXIMUM_THREAD_LOCAL_STORAGE_SIZE % RTEMS_TASK_STORAGE_ALIGNMENT == 0, + CONFIGURE_MAXIMUM_THREAD_LOCAL_STORAGE_SIZE +); + const size_t _Thread_Maximum_TLS_size = CONFIGURE_MAXIMUM_THREAD_LOCAL_STORAGE_SIZE; |