From: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
To: Wilco Dijkstra <Wilco.Dijkstra@arm.com>,
"libc-alpha@sourceware.org" <libc-alpha@sourceware.org>
Subject: Re: [PATCH v3] elf: Use C11 atomics on _dl_mcount
Date: Wed, 21 Sep 2022 11:01:58 -0300 [thread overview]
Message-ID: <0cc18285-5472-54f1-a83a-8aa5cbe1985b@linaro.org> (raw)
In-Reply-To: <AS4PR08MB79016FABCBB9B2BCE9A3B580834C9@AS4PR08MB7901.eurprd08.prod.outlook.com>
On 20/09/22 19:59, Wilco Dijkstra wrote:
> Hi Adhemerval,
>
>
> @@ -558,14 +558,14 @@ _dl_mcount (ElfW(Addr) frompc, ElfW(Addr) selfpc)
> /* If we still have no entry stop searching and insert. */
> if (*topcindex == 0)
> {
> - unsigned int newarc = catomic_exchange_and_add (narcsp, 1);
> + unsigned int newarc = atomic_fetch_add_relaxed (narcsp, 1) + 1;
>
> This adds a spurious + 1. Other than that it looks good to me.
Thanks, I have removed it.
>
> Reviewed-by: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
>
> Cheers,
> Wilco
prev parent reply other threads:[~2022-09-21 14:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-20 19:04 Adhemerval Zanella
2022-09-20 22:59 ` Wilco Dijkstra
2022-09-21 14:01 ` Adhemerval Zanella Netto [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=0cc18285-5472-54f1-a83a-8aa5cbe1985b@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).