public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: Sebastian Huber <sebastian.huber@embedded-brains.de>
To: Dave Nadler <drn@nadler.com>, newlib@sourceware.org
Subject: Re: [PATCH] Remove use of _global_impure_ptr
Date: Wed, 4 May 2022 17:29:44 +0200	[thread overview]
Message-ID: <287e0025-74b1-ff51-68b3-0d789479ed5f@embedded-brains.de> (raw)
In-Reply-To: <2e8518f4-f26a-b360-cef4-0d5361c3f2fb@nadler.com>

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/

      reply	other threads:[~2022-05-04 15:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-03 13:40 Sebastian Huber
2022-05-04 13:34 ` Corinna Vinschen
2022-05-04 13:38   ` Sebastian Huber
2022-05-04 15:22   ` Dave Nadler
2022-05-04 15:29     ` Sebastian Huber [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=287e0025-74b1-ff51-68b3-0d789479ed5f@embedded-brains.de \
    --to=sebastian.huber@embedded-brains.de \
    --cc=drn@nadler.com \
    --cc=newlib@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).