Re: [PATCH 3/5] rust: sync: add WaitQueue infrastructure

"Danilo Krummrich" <[email protected]> Mon, 27 Jul 2026 14:46:32 +0200
Newsgroups org.kernel.vger.rust-for-linux,org.kernel.vger.linux-fsdevel,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On Mon Jul 27, 2026 at 2:02 PM CEST, Gary Guo wrote:
>> @@ -0,0 +1,388 @@
>> +// SPDX-License-Identifier: GPL-2.0
>> +
>> +//! Wait queue.
>> +//!
>> +//! C header: [`include/linux/wait.h`](srctree/include/linux/wait.h)
>> +
>> +use super::LockClassKey;
>> +use crate::{
>> +    prelude::*,
>> +    str::CStr,
>> +    task::{
>> +        self,
>> +        TASK_INTERRUPTIBLE,
>> +        TASK_NORMAL,
>> +        TASK_UNINTERRUPTIBLE, //
>
> Hmm, I am not sure why we are exposing these as constants from kernel::task.
> Regardless, Given that you're using them for bindings, you should probably get
> them from bindings::TASK_* instead.

See commit f090f0d0eea9 ("rust: sync: update integer types in CondVar");
personally I don't mind either way.