Re: [PATCH] rust: sync: Makes `CondVar::wait()` an uninterruptible wait

From: Benno Lossin
Date: Mon Dec 18 2023 - 12:39:45 EST


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@xxxxxxxxx> 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@xxxxxxxxx>
>>> Signed-off-by: Boqun Feng <boqun.feng@xxxxxxxxx>
>>
>> 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
that should not matter.

--
Cheers,
Benno