public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
To: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>,
	'GNU C Library' <libc-alpha@sourceware.org>
Subject: Re: [PATCH] Use C11 atomics instead of atomic_and/or
Date: Thu, 22 Sep 2022 14:06:09 +0000	[thread overview]
Message-ID: <AS4PR08MB79014E3976F473B352C209EE834E9@AS4PR08MB7901.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <32dd1e65-c065-99fa-4c49-d0612f1ef9e3@linaro.org>

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...

Cheers,
Wilco


  reply	other threads:[~2022-09-22 14:06 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 [this message]
2022-09-23 13:34     ` Adhemerval Zanella Netto

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=AS4PR08MB79014E3976F473B352C209EE834E9@AS4PR08MB7901.eurprd08.prod.outlook.com \
    --to=wilco.dijkstra@arm.com \
    --cc=adhemerval.zanella@linaro.org \
    --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).