All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: "Paul E. McKenney" <paulmck@kernel.org>
Cc: rcu@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel-team@meta.com, rostedt@goodmis.org, peterz@infradead.org,
	andrii@kernel.org
Subject: Re: [PATCH rcu] srcu: Guarantee non-negative return value from srcu_read_lock()
Date: Mon, 21 Oct 2024 23:51:40 -0700	[thread overview]
Message-ID: <ZxdLfLWWrAEfRiXV@infradead.org> (raw)
In-Reply-To: <97594073-e296-4876-9d6a-1e4a4f33d857@paulmck-laptop>

On Mon, Oct 21, 2024 at 03:13:05PM -0700, Paul E. McKenney wrote:
> For almost 20 years, the int return value from srcu_read_lock() has
> been always either zero or one.  This commit therefore documents the
> fact that it will be non-negative.

If it is always zero or one, wouldn't bool the better return value
type?


  parent reply	other threads:[~2024-10-22  6:51 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-21 22:13 [PATCH rcu] srcu: Guarantee non-negative return value from srcu_read_lock() Paul E. McKenney
2024-10-21 23:50 ` Andrii Nakryiko
2024-10-22  0:21   ` Paul E. McKenney
2024-10-22  2:01     ` Andrii Nakryiko
2024-10-22  3:30       ` Paul E. McKenney
2024-10-22  3:40         ` Andrii Nakryiko
2024-10-22  7:07         ` Peter Zijlstra
2024-10-22 14:27           ` Paul E. McKenney
2024-10-22  6:51 ` Christoph Hellwig [this message]
2024-10-22  7:06   ` Peter Zijlstra
2024-10-22  7:07     ` Christoph Hellwig
2024-10-22  7:10       ` Peter Zijlstra
2024-10-22  7:13         ` Christoph Hellwig
2024-10-22 14:26           ` Paul E. McKenney
2024-10-22 17:29             ` Andrii Nakryiko
2024-10-23  6:40               ` Christoph Hellwig
2024-10-23 16:34                 ` Andrii Nakryiko
2024-10-23 16:46                   ` Alan Huang
2024-10-23 16:59                     ` Andrii Nakryiko
2024-10-23  6:58             ` Alan Huang
2024-10-23 16:40               ` Paul E. McKenney
2024-10-23 16:56                 ` Alan Huang

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=ZxdLfLWWrAEfRiXV@infradead.org \
    --to=hch@infradead.org \
    --cc=andrii@kernel.org \
    --cc=kernel-team@meta.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmck@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rcu@vger.kernel.org \
    --cc=rostedt@goodmis.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.