From: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
To: Wilco Dijkstra <Wilco.Dijkstra@arm.com>,
'GNU C Library' <libc-alpha@sourceware.org>
Subject: Re: [PATCH] Use C11 atomics instead of atomic_and/or
Date: Fri, 23 Sep 2022 10:34:49 -0300 [thread overview]
Message-ID: <4f9cfb76-5d9f-7d10-3e28-e9c740bfe722@linaro.org> (raw)
In-Reply-To: <AS4PR08MB79014E3976F473B352C209EE834E9@AS4PR08MB7901.eurprd08.prod.outlook.com>
On 22/09/22 11:06, Wilco Dijkstra wrote:
> Hi Adhemerval,
>
>> LGTM, the current atomic_or and atomic_and have acquire semantic already. What
>> I am not not sure if if we need to use release MO on start_thread, since the
>> idea is to synchronize with the locking on pthread_mutex_lock.
>
> Indeed, it is not clear what is being synchronized with the FUTEX_OWNER_DIED
> flag. However it is being used in a lock, so I kept the implied acquire MO of the
> old atomics. If it is simply a flag that does not affect locking and the data
> protected by the lock, then relaxed MO would be correct. However that requires
> detective work to try to reverse engineer the intended implementation...
I tried to check with kernel robust implementation, but this specific code is
a fallback that should be handled by the kernel. It currently used on very
specific cases (qemu and some old architectures that do not support
set_robust_list) so I think we reevaluate it later.
prev parent reply other threads:[~2022-09-23 13:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-05 16:48 Wilco Dijkstra
2022-09-21 17:08 ` Adhemerval Zanella Netto
2022-09-22 14:06 ` Wilco Dijkstra
2022-09-23 13:34 ` 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=4f9cfb76-5d9f-7d10-3e28-e9c740bfe722@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).