public inbox for
 help / color / mirror / Atom feed
From: Adhemerval Zanella Netto <>
To: Wilco Dijkstra <>,
	'GNU C Library' <>
Subject: Re: [PATCH] Use C11 atomics instead of atomic_and/or
Date: Fri, 23 Sep 2022 10:34:49 -0300	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

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.

      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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \

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