RTEMS | confdefs/newlib: error on CONFIGURE_DISABLE_NEWLIB_REENTRANCY with TLS newlib (!1569)

Aaditya Agarwal (@aaditya8979) gitlab at rtems.org
Tue Nov 10 05:51:24 UTC 2026




Aaditya Agarwal commented: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1569#note_162256


Fair point @sebhub, dug into confdefs/extensions.h and you are right. Disabling it drops RTEMS_NEWLIB_EXTENSION, so newlib_terminate_hook does not get called and \_reclaim_reent(NULL) is skipped on thread exit.. So it is not a complete no-op.

The intent in #5781 from @joel seemed to be that the option promises disabling per-thread reentrancy to save TCB space and falling back to a global reent, With Newlib TLS, \__getreent is never called anyway, so that part does nothing.

If we want to keep the option just to let people skip the thread exit cleanup hook under TLS, we could drop the #error and instead update appl-config.h to explain that reentrancy stays thread-local and only the cleanup extension is disabled. Otherwise we keep the error if the option is considered obsolete with TLS.

What do you both prefer here??

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1569#note_162256
You're receiving this email because of your account on gitlab.rtems.org. Unsubscribe from this thread: https://gitlab.rtems.org/-/namespace/49/sent_notifications/6-2w4n2t0kh7nomhhj0ffib54vd-1d/unsubscribe | Manage all notifications: https://gitlab.rtems.org/-/profile/notifications | Help: https://gitlab.rtems.org/help


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20261110/8fbae754/attachment.htm>


More information about the bugs mailing list