[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251127115735.52946137@nimda.home>
Date: Thu, 27 Nov 2025 11:57:35 +0300
From: Onur Özkan <work@...rozkan.dev>
To: Lyude Paul <lyude@...hat.com>
Cc: rust-for-linux@...r.kernel.org, lossin@...nel.org, ojeda@...nel.org,
alex.gaynor@...il.com, boqun.feng@...il.com, gary@...yguo.net,
a.hindborg@...nel.org, aliceryhl@...gle.com, tmgross@...ch.edu,
dakr@...nel.org, peterz@...radead.org, mingo@...hat.com, will@...nel.org,
longman@...hat.com, felipe_life@...e.com, daniel@...lak.dev,
bjorn3_gh@...tonmail.com, daniel.almeida@...labora.com,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v7 2/6] rust: implement `Class` for ww_class support
On Fri, 21 Nov 2025 14:15:00 -0500
Lyude Paul <lyude@...hat.com> wrote:
> This should be is_wait_die.into() like you did in the code below.
Can't call into() in const function.
> With that:
>
> Reviewed-by: Lyude Paul <lyude@...hat.com>
>
> On Sat, 2025-11-01 at 19:10 +0300, Onur Özkan wrote:
> > +impl Class {
> > + /// Creates an unpinned [`Class`].
> > + ///
> > + /// # Safety
> > + ///
> > + /// Caller must guarantee that the returned value is not moved
> > after creation.
> > + pub const unsafe fn unpinned_new(name: &'static CStr,
> > is_wait_die: bool) -> Self {
> > + Class {
> > + inner: Opaque::new(bindings::ww_class {
> > + stamp: bindings::atomic_long_t { counter: 0 },
> > + acquire_name: name.as_char_ptr(),
> > + mutex_name: name.as_char_ptr(),
> > + is_wait_die: is_wait_die as u32,
>
-Onur
Powered by blists - more mailing lists