diff options
Diffstat (limited to '')
-rw-r--r-- | cpukit/libcsupport/src/newlibc_reent.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cpukit/libcsupport/src/newlibc_reent.c b/cpukit/libcsupport/src/newlibc_reent.c index 2dccfd0375..ee82f00858 100644 --- a/cpukit/libcsupport/src/newlibc_reent.c +++ b/cpukit/libcsupport/src/newlibc_reent.c @@ -29,6 +29,7 @@ #include <rtems/libcsupport.h> #include <rtems/score/threadimpl.h> +#ifndef _REENT_THREAD_LOCAL bool newlib_create_hook( rtems_tcb *current_task RTEMS_UNUSED, rtems_tcb *creating_task @@ -38,12 +39,17 @@ bool newlib_create_hook( return true; } +#endif void newlib_terminate_hook( rtems_tcb *current_task ) { +#ifdef _REENT_THREAD_LOCAL + _reclaim_reent(NULL); +#else _reclaim_reent(current_task->libc_reent); +#endif } #endif |