From: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
To: Florian Weimer <fweimer@redhat.com>,
Wilco Dijkstra via Libc-alpha <libc-alpha@sourceware.org>
Subject: Re: [PATCH] Use C11 atomics instead of atomic_bit_set/bit_test_set
Date: Tue, 6 Sep 2022 16:49:54 +0000 [thread overview]
Message-ID: <AS4PR08MB7901DC7276EA64F97DE73F7F837E9@AS4PR08MB7901.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <87mtbc66t4.fsf@oldenburg.str.redhat.com>
Hi Florian,
> Why is acquire MO required here? I don't see any synchronizing store.
> Isn't this mostly a compiler barrier for use-after-free detection?
You're right, it looks like the only reason for atomic is to ensure memory
is only freed once. A few cancelhandling accesses use acquire, and there
are various relaxed loads and even non-atomic loads of it, but not a
single release store, so there is no use for acquire MO here.
Cheers,
Wilco
v2:
next prev parent reply other threads:[~2022-09-06 16:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-05 16:35 Wilco Dijkstra
2022-09-06 12:11 ` Florian Weimer
2022-09-06 16:49 ` Wilco Dijkstra [this message]
2022-09-06 16:52 ` Wilco Dijkstra
2022-09-06 17:42 ` Florian Weimer
2022-09-06 18:41 ` [PATCH v2] " Wilco Dijkstra
2022-09-13 10:02 ` Florian Weimer
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=AS4PR08MB7901DC7276EA64F97DE73F7F837E9@AS4PR08MB7901.eurprd08.prod.outlook.com \
--to=wilco.dijkstra@arm.com \
--cc=fweimer@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).