[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZYCyOuChFYf_J_o1@boqun-archlinux>
Date: Mon, 18 Dec 2023 12:57:30 -0800
From: Boqun Feng <boqun.feng@...il.com>
To: Benno Lossin <benno.lossin@...ton.me>
Cc: Alice Ryhl <aliceryhl@...gle.com>, rust-for-linux@...r.kernel.org,
linux-kernel@...r.kernel.org, Tiago Lam <tiagolam@...il.com>,
Miguel Ojeda <ojeda@...nel.org>,
Alex Gaynor <alex.gaynor@...il.com>,
Wedson Almeida Filho <wedsonaf@...il.com>,
Gary Guo <gary@...yguo.net>,
Björn Roy Baron <bjorn3_gh@...tonmail.com>,
Andreas Hindborg <a.hindborg@...sung.com>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>, Will Deacon <will@...nel.org>,
Waiman Long <longman@...hat.com>,
Martin Rodriguez Reboredo <yakoyoku@...il.com>
Subject: Re: [PATCH] rust: sync: Makes `CondVar::wait()` an uninterruptible
wait
On Mon, Dec 18, 2023 at 05:39:14PM +0000, Benno Lossin wrote:
> On 12/16/23 00:45, Boqun Feng wrote:
> > On Fri, Dec 15, 2023 at 11:27:56AM +0100, Alice Ryhl wrote:
> >> On Thu, Dec 14, 2023 at 9:04 PM Boqun Feng <boqun.feng@...il.com> wrote:
> >>>
> >>> Currently, `CondVar::wait()` is an interruptible wait, and this is
> >>> different than `wait_event()` in include/linux/wait.h (which is an
> >>> uninterruptible wait). To avoid confusion between different APIs on the
> >>> interruptible/uninterruptible, make `CondVar::wait()` an uninterruptible
> >>> wait same as `wait_event()`, also rename the old `wait()` to
> >>> `CondVar::wait_interruptible()`.
> >>>
> >>> Spotted-by: Tiago Lam <tiagolam@...il.com>
> >>> Signed-off-by: Boqun Feng <boqun.feng@...il.com>
> >>
> >> The diff is a bit hard to read because you swapped the order of the
> >> functions, but LGTM.
> >>
> >
> > Yeah, I did that because `wait_interruptible` metioned `wait`, so I had
> > to make `wait` still before `wait_interruptible`.
>
> What do you mean? If you are talking about the doclink, then
I meant I prefer to keeping `wait` text-order-before
`wait_interruptible`, so that readers will first read it.
> that should not matter.
Yeah, I know the ordering doesn't matter for generating doc. However,
the ordering still matters for readers, I'd like them to learn about
`wait` first since according to the existing API in kernel, they are the
major usage.
Thanks for pointing it out anyway! ;-)
Regards,
Boqun
>
> --
> Cheers,
> Benno
>
>
Powered by blists - more mailing lists