Re: [PATCH] Remove use of _global_impure_ptr

Sebastian Huber <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <[email protected]>
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: [email protected]
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/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.