From: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
To: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
Cc: 'GNU C Library' <libc-alpha@sourceware.org>
Subject: Re: [PATCH] elf: Use C11 like atomics on _dl_mcount
Date: Thu, 1 Sep 2022 10:09:07 -0300 [thread overview]
Message-ID: <59b9367c-08f1-4f38-7273-b5eca48be60e@linaro.org> (raw)
In-Reply-To: <AS4PR08MB790103DC9200C5A637926460837B9@AS4PR08MB7901.eurprd08.prod.outlook.com>
On 01/09/22 09:21, Wilco Dijkstra wrote:
> Hi Adhemerval,
>
> - newfromidx = catomic_exchange_and_add (&fromidx, 1) + 1;
> + newfromidx = atomic_fetch_and_acquire (&fromidx, 1) + 1;
>
> I don't see how that could possibly work...
>
> Btw is this trying to split my catomic patch into baby steps? Given these
> are simple counters (not locks), you only need atomicity, so relaxed MO
> is the obvious equivalent.
Right, I was not trying to be clever here and acquire might be a more
strict memory order.
And I haven't replied yet to you atomic refactor, but I also think changing
step by step is indeed better than changing all the atomic altogether.
Do you think using relaxed on all atomic is suffice here?
next prev parent reply other threads:[~2022-09-01 13:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-01 12:21 Wilco Dijkstra
2022-09-01 13:09 ` Adhemerval Zanella Netto [this message]
2022-09-01 14:19 ` Wilco Dijkstra
2022-09-01 15:30 ` Adhemerval Zanella Netto
2022-09-01 23:18 ` Wilco Dijkstra
2022-09-02 12:21 ` Adhemerval Zanella Netto
2022-09-02 13:27 ` Wilco Dijkstra
-- strict thread matches above, loose matches on Subject: below --
2022-08-31 18:14 Adhemerval Zanella
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=59b9367c-08f1-4f38-7273-b5eca48be60e@linaro.org \
--to=adhemerval.zanella@linaro.org \
--cc=Wilco.Dijkstra@arm.com \
--cc=libc-alpha@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).