[PATCH] Remove use of _global_impure_ptr
Sebastian Huber
sebastian.huber@embedded-brains.de
Wed May 4 15:29:44 GMT 2022
On 04/05/2022 17:22, Dave Nadler wrote:
> On 5/4/2022 9:34 AM, Corinna Vinschen wrote:
>> Hi Sebastian,
>>
>> On May 3 15:40, Sebastian Huber wrote:
>>> Remove the pointer indrection through the read-only
>>> _global_impure_ptr and
>>> directly use a globally visible _impure_data object of type struct
>>> reent. This
>>> enables the static initialization of global data structures in a
>>> follow up
>>> patch. In addition, we get rid of a machine-specific file.
>> the patch looks good. I just wonder if we really need the
>> impure-compat.c file. Backward-compat is no problem for embedded stuff,
>> and Cygwin doesn't expose _global_impure_ptr to user space either.
>>
>> If there's no other compelling reason, you can just drop it and push
>> the rest.
>>
>> Thanks,
>> Corinna
>
> Apologies if this is a dumb question, but this patch does not
> affect the use of the global _impure_ptr, right? For example
> FreeRTOS allocates a reentrancy structure for each task and switches
> _impure_ptr on context switches.
This patch doesn't change the behaviour of _impure_ptr. The _impure_ptr
is initialized to point to a global struct _reent object. Now, this
object is externally visible.
--
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