public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: Corinna Vinschen <vinschen@redhat.com>
To: newlib@sourceware.org
Subject: Re: [PATCH v2 1/1] Make __sdidinit unused
Date: Mon, 21 Feb 2022 13:33:48 +0100	[thread overview]
Message-ID: <YhOGrEqzCDBH83eg@calimero.vinschen.de> (raw)
In-Reply-To: <c478b478-8f82-c221-a45b-d8cb9531877a@embedded-brains.de>

Hi Seb,

On Feb 18 17:21, Sebastian Huber wrote:
> Hello Corinna,
> 
> On 18/02/2022 13:41, Corinna Vinschen wrote:
> > Hi Matt,
> > 
> > On Feb 18 10:45, Matthew Joyce wrote:
> > > Remove dependency on __sdidinit member of struct _reent to check
> > > object initialization. Like __sdidinit, the __cleanup member of
> > > struct _reent is initialized in the __sinit() function. Checking
> > > initialization against __cleanup serves the same purpose and will
> > > reduce overhead in the __sfp() function in a follow up patch.
> > 
> > The patch looks right now.  But.
> > 
> > What exactly are you going to do in __sfp?  The reason I'm asking is
> > that it's absolutely not clear yet which purpose this change serves.
> > Looking at this patch, I only see that, rather than using an available
> > flag, a pointer is now set to an invalid value -1, which looks more
> > dangerous than what we did before.
> > 
> > Care to explain or, even better, send the patch you have in mind?
> 
> this is related to our attempt to use individual thread-local storage
> objects instead of the monolithic struct _reent:
> 
> https://sourceware.org/pipermail/newlib/2022/018855.html
> 
> It turned out that this is not possible while _GLOBAL_REENT exists. Getting
> rid of struct _reent members with similar functionality helps to refactor
> the code.
> 
> Instead of using -1 as a magic value a safer option would be to assign a
> dummy function which does nothing:
> [...]

I like the idea.  This looks good in the code.  A comment in
_cygtls::init_thread might be helpful in future, but it's not
required for this patch submission.

Matt, can you pleae resubmit with this change?


Thanks,
Corinna


      reply	other threads:[~2022-02-21 12:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-18  9:45 [PATCH v2 0/1] " Matthew Joyce
2022-02-18  9:45 ` [PATCH v2 1/1] " Matthew Joyce
2022-02-18 12:41   ` Corinna Vinschen
2022-02-18 16:21     ` Sebastian Huber
2022-02-21 12:33       ` Corinna Vinschen [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=YhOGrEqzCDBH83eg@calimero.vinschen.de \
    --to=vinschen@redhat.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).