From: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
To: DJ Delorie <dj@redhat.com>
Cc: "libc-alpha@sourceware.org" <libc-alpha@sourceware.org>
Subject: Re: [PATCH] Use C11 atomics instead of atomic_decrement(_val)
Date: Fri, 9 Sep 2022 14:02:42 +0000 [thread overview]
Message-ID: <AS4PR08MB7901DED887CC00A154F00CFA83439@AS4PR08MB7901.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <xnfsh139sq.fsf@greed.delorie.com>
Hi DJ,
Thanks for the review.
> atomic_decrement returns the NEW value
> atomic_fetch_add_relaxed returns the OLD value
Indeed, this series of patches replaces the many different variations of atomic
add with a single one that directly maps to the GCC builtin (and the underlying
atomic operation).
GCC also has __atomic_add_fetch which returns the new value, so once all this
code has been cleaned up we could add support for that.
Cheers,
Wilco
prev parent reply other threads:[~2022-09-09 14:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-08 14:09 Wilco Dijkstra
2022-09-08 20:12 ` DJ Delorie
2022-09-09 14:02 ` Wilco Dijkstra [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=AS4PR08MB7901DED887CC00A154F00CFA83439@AS4PR08MB7901.eurprd08.prod.outlook.com \
--to=wilco.dijkstra@arm.com \
--cc=dj@redhat.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).