public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
From: Carlos O'Donell <carlos@redhat.com>
To: Alejandro Colomar <alx@kernel.org>
Cc: "Jₑₙₛ Gustedt" <jens.gustedt@inria.fr>,
	"Michael Kerrisk" <mtk.manpages@gmail.com>,
	linux-man@vger.kernel.org, "Ulrich Drepper" <drepper@redhat.com>,
	"Ingo Molnar" <mingo@kernel.org>,
	"Todd Lewis" <todd.lewis@gs.com>,
	"Alexandre Oliva" <aoliva@redhat.com>
Subject: Re: bug in futex.2, FUTEX_CMP_REQUEUE
Date: Tue, 27 May 2025 08:54:32 -0400	[thread overview]
Message-ID: <ef1da3c5-2641-4baa-ac9a-4e5f9f0eecbc@redhat.com> (raw)
In-Reply-To: <3bk7nlklhg5kft33gyworbh7pbs2ezwmxm2gfxfnh6sqctq52v@scjej2sz423e>

On 5/27/25 8:51 AM, Alejandro Colomar wrote:
> Hi Carlos,
> 
> On Tue, May 27, 2025 at 08:37:16AM -0400, Carlos O'Donell wrote:
>> Since the parenthetical is not clear about val vs. val2, it can be
>> read in two different ways.
> 
> The entire paragraph is
> 
>              Typical  values to specify for val are 0 or 1.  (Specifying
>              INT_MAX is not  useful,  because  it  would  make  the  FU‐
>              TEX_CMP_REQUEUE  operation  equivalent to FUTEX_WAKE.)  The
>              limit value specified via val2 is  typically  either  1  or
>              INT_MAX.   (Specifying the argument as 0 is not useful, be‐
>              cause it would make the FUTEX_CMP_REQUEUE operation equiva‐
>              lent to FUTEX_WAIT.)
> 
> 
> There's a parenthetical after talking about val, and another one after
> talking about val2.  I think the latter parenthetical unambiguously
> refers to val2.  I would have written them as part of each sentence, to
> make it even less ambiguous, though.

Just adding "val" and "val2" to the parenthenticals removes any confusion
if you are quickly skimming the text?

There is still the degenerate case of val==0 and val2==INT_MAX which is
equivalent to FUTEX_WAKE followed by an atomic FUTEX_WAIT since all
waiters move queues and no waiter is officially woken and allowed to
return to userspace?

-- 
Cheers,
Carlos.


  reply	other threads:[~2025-05-27 12:54 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-27  9:53 bug in futex.2, FUTEX_CMP_REQUEUE Jₑₙₛ Gustedt
2025-05-27 11:30 ` Carlos O'Donell
2025-05-27 12:21   ` Jₑₙₛ Gustedt
2025-05-27 12:28     ` Carlos O'Donell
2025-05-27 12:23   ` Alejandro Colomar
2025-05-27 12:35     ` Carlos O'Donell
2025-05-27 12:01 ` Alejandro Colomar
2025-05-27 12:12   ` Carlos O'Donell
2025-05-27 12:28     ` Jₑₙₛ Gustedt
2025-05-27 12:37       ` Carlos O'Donell
2025-05-27 12:51         ` Alejandro Colomar
2025-05-27 12:54           ` Carlos O'Donell [this message]
2025-05-27 12:28     ` Alejandro Colomar
2025-05-27 12:42       ` Carlos O'Donell
2025-05-27 12:57         ` Alejandro Colomar
2025-05-27 12:59           ` Alejandro Colomar
2025-05-27 13:07         ` Jₑₙₛ Gustedt
2025-05-29 23:35   ` Alejandro Colomar

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=ef1da3c5-2641-4baa-ac9a-4e5f9f0eecbc@redhat.com \
    --to=carlos@redhat.com \
    --cc=alx@kernel.org \
    --cc=aoliva@redhat.com \
    --cc=drepper@redhat.com \
    --cc=jens.gustedt@inria.fr \
    --cc=linux-man@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=mtk.manpages@gmail.com \
    --cc=todd.lewis@gs.com \
    /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