From: Dave Nadler <drn@nadler.com>
To: Craig Howland <cc1964t@gmail.com>, newlib@sourceware.org
Subject: Re: Fw: Some questions on reentrancy, __DYNAMIC_REENT__ and _impure_ptr
Date: Fri, 2 Apr 2021 14:35:49 -0400 [thread overview]
Message-ID: <9d80da2e-002d-dc4e-7608-f70211291f47@nadler.com> (raw)
In-Reply-To: <CANk6obQFyikJVC1S1WWpahMyUeGdaSaJqOcGmjbjhfhxH_p_1w@mail.gmail.com>
Sorry if I was not clear: If you use one memory location for _impure_ptr,
and you have two processors running two threads, this does not work.
Instead an alternate mechanism (ie thread-local storage for this ptr) is
needed,
to support each concurrent thread with a separate reentrancy structure.
Hope I was clear this time!
Thanks,
Best Regards, Dve
On 4/2/2021 12:51 PM, C Howland via Newlib wrote:
>> ------------------------------
>> *From:* Newlib <newlib-bounces@sourceware.org> on behalf of Dave Nadler <
>> drn@nadler.com>
>> *Sent:* Friday, April 2, 2021 7:34 AM
>> *To:* Nick <cl26@nicolachel.net>
>> *Cc:* newlib@sourceware.org <newlib@sourceware.org>
>> *Subject:* Re: Some questions on reentrancy, __DYNAMIC_REENT__ and
>> _impure_ptr
>>
>>
>> Thanks Jeff also for answering the mutex question I missed.
>> One other issue I should have mentioned that becomes more important daily:
>> If there are multiple processors the simple _impure_ptr mechanism won't
>> work...
>>
> Well, if you ignore the fact you have multiple processors and do nothing
> about it, then, sure, you'll have problems. But if you manage it (e.g.
> treating each processor as its own thread, or as independent of each other,
> etc.), then multiple processors can work fine. (I have such systems
> working.)
> Craig
--
Dave Nadler, USA East Coast voice (978) 263-0097, drn@nadler.com, Skype
Dave.Nadler1
next prev parent reply other threads:[~2021-04-02 18:35 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-01 4:58 Nick
2021-04-01 14:48 ` Dave Nadler
2021-04-02 3:39 ` Nick
2021-04-02 11:34 ` Dave Nadler
[not found] ` <BN3P110MB05636BD58188D760B6408B6E9A7A9@BN3P110MB0563.NAMP110.PROD.OUTLOOK.COM>
2021-04-02 16:51 ` Fw: " C Howland
2021-04-02 18:35 ` Dave Nadler [this message]
2021-04-02 18:42 ` Joel Sherrill
2021-04-02 19:20 ` Jeff Johnston
2021-04-03 1:43 ` Nick
2021-04-01 16:26 ` Jeff Johnston
2021-04-02 3:27 ` Nick
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=9d80da2e-002d-dc4e-7608-f70211291f47@nadler.com \
--to=drn@nadler.com \
--cc=cc1964t@gmail.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).