[PATCH 00/14] Add --enable-newlib-reent-thread-local option
Sebastian Huber
sebastian.huber@embedded-brains.de
Tue Jul 12 11:18:17 GMT 2022
On 21/06/2022 14:49, Sebastian Huber wrote:
> By default, Newlib uses a huge object of type struct _reent to store
> thread-specific data. This object is returned by __getreent() if the
> __DYNAMIC_REENT__ Newlib configuration option is defined.
>
> The reentrancy structure contains for example errno and the standard input,
> output, and error file streams. This means that if an application only uses
> errno it has a dependency on the file stream support even if it does not use
> it. This is an issue for lower end targets and applications which need to
> qualify the software according to safety standards (for example ECSS-E-ST-40C,
> ECSS-Q-ST-80C, IEC 61508, ISO 26262, DO-178, DO-330, DO-333).
>
> If the new _REENT_THREAD_LOCAL configuration option is enabled, then struct
> _reent is replaced by dedicated thread-local objects for each struct _reent
> member. The thread-local objects are defined in translation units which use
> the corresponding object.
>
> Patches 1 to 13 contain no functional changes (hopefully). They just introduce
> macros to be able to use struct _reent members or thread-local objects
> depending on the new _REENT_THREAD_LOCAL option. Patch 14 adds the new
> configuration option.
Are there any general objections to integrate this patch set?
For the errno handling we have the option to use the new _REENT_ERRNO()
macro or the existing __errno_r() macro.
--
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.huber@embedded-brains.de
phone: +49-89-18 94 741 - 16
fax: +49-89-18 94 741 - 08
Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/
More information about the Newlib
mailing list