summaryrefslogtreecommitdiffstats
path: root/cpukit/include
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2022-02-18 16:33:10 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2022-02-21 11:08:30 +0100
commitd69acf87dc1fcb7c2f06f6e82376192c9aadfd3b (patch)
tree4830e0994c5fd8a3b88429d078cb67476a276b74 /cpukit/include
parentbsp/imxrt: Enforce alignment for devicetree (diff)
downloadrtems-d69acf87dc1fcb7c2f06f6e82376192c9aadfd3b.tar.bz2
config: CONFIGURE_DISABLE_NEWLIB_REENTRANCY
Do not initialize Thread_Control::libc_reent if CONFIGURE_DISABLE_NEWLIB_REENTRANCY is defined. This helps to catch errors with a NULL pointer exception rather than a corruption of the thread control block.
Diffstat (limited to 'cpukit/include')
-rw-r--r--cpukit/include/rtems/confdefs/threads.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/cpukit/include/rtems/confdefs/threads.h b/cpukit/include/rtems/confdefs/threads.h
index 279c6264db..503a4b20ec 100644
--- a/cpukit/include/rtems/confdefs/threads.h
+++ b/cpukit/include/rtems/confdefs/threads.h
@@ -161,8 +161,6 @@ struct Thread_Configured_control {
#endif
#ifdef _CONFIGURE_ENABLE_NEWLIB_REENTRANCY
struct _reent Newlib;
- #else
- struct { /* Empty */ } Newlib;
#endif
};
@@ -176,13 +174,16 @@ const Thread_Control_add_on _Thread_Control_add_ons[] = {
Control.API_Extensions[ THREAD_API_RTEMS ]
),
offsetof( Thread_Configured_control, API_RTEMS )
- }, {
- offsetof(
- Thread_Configured_control,
- Control.libc_reent
- ),
- offsetof( Thread_Configured_control, Newlib )
}
+ #ifdef _CONFIGURE_ENABLE_NEWLIB_REENTRANCY
+ , {
+ offsetof(
+ Thread_Configured_control,
+ Control.libc_reent
+ ),
+ offsetof( Thread_Configured_control, Newlib )
+ }
+ #endif
#if CONFIGURE_MAXIMUM_THREAD_NAME_SIZE > 1
, {
offsetof(