summaryrefslogtreecommitdiffstats
path: root/cpukit/include/rtems/confdefs/newlib.h
diff options
context:
space:
mode:
authorMatt Joyce <matthew.joyce@embedded-brains.de>2022-05-23 12:27:56 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2022-07-21 07:22:13 +0200
commit6d4b390f99af0e9d5873a3cb8ebaccfa05cbe37b (patch)
tree69d86bdace4793f3546d387fc00297917c234467 /cpukit/include/rtems/confdefs/newlib.h
parentsptests: Disable Newlib reentrancy (diff)
downloadrtems-6d4b390f99af0e9d5873a3cb8ebaccfa05cbe37b.tar.bz2
Support _REENT_THREAD_LOCAL Newlib configuration
In case the Newlib _REENT_THREAD_LOCAL configuration option is enabled, the struct _reent is not defined (there is only a forward declaration in <sys/reent.h>). Instead, the usual members of struct _reent are available as dedicatd thread-local storage objects. Update #4560.
Diffstat (limited to 'cpukit/include/rtems/confdefs/newlib.h')
-rw-r--r--cpukit/include/rtems/confdefs/newlib.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/cpukit/include/rtems/confdefs/newlib.h b/cpukit/include/rtems/confdefs/newlib.h
index 96bf850163..fef71a8855 100644
--- a/cpukit/include/rtems/confdefs/newlib.h
+++ b/cpukit/include/rtems/confdefs/newlib.h
@@ -57,7 +57,8 @@
extern "C" {
#endif
-#ifdef _CONFIGURE_ENABLE_NEWLIB_REENTRANCY
+#if defined(_CONFIGURE_ENABLE_NEWLIB_REENTRANCY) && \
+ !defined(_REENT_THREAD_LOCAL)
struct _reent *__getreent( void )
{
return _Thread_Get_executing()->libc_reent;