[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CANiq72k3jOKNxsDwCE8XPhb=SddwOnCh20ATpFX_H_99r7u04w@mail.gmail.com>
Date: Thu, 24 Jul 2025 22:07:58 +0200
From: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
To: Lyude Paul <lyude@...hat.com>
Cc: rust-for-linux@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
Boqun Feng <boqun.feng@...il.com>, linux-kernel@...r.kernel.org,
Peter Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...hat.com>, Will Deacon <will@...nel.org>,
Waiman Long <longman@...hat.com>, Miguel Ojeda <ojeda@...nel.org>,
Alex Gaynor <alex.gaynor@...il.com>, Gary Guo <gary@...yguo.net>,
Björn Roy Baron <bjorn3_gh@...tonmail.com>,
Benno Lossin <lossin@...nel.org>, Andreas Hindborg <a.hindborg@...nel.org>,
Alice Ryhl <aliceryhl@...gle.com>, Trevor Gross <tmgross@...ch.edu>,
Danilo Krummrich <dakr@...nel.org>
Subject: Re: [PATCH v2] rust: lock: Export Guard::do_unlocked()
On Thu, Jul 24, 2025 at 8:28 PM Lyude Paul <lyude@...hat.com> wrote:
>
> + /// Releases this [`Guard`]'s lock temporary, executes `cb` and then re-acquires it.
temporarily?
> + /// If the closure returns a value, it will be returned by this function.
Perhaps we can simplify by avoiding the conditional:
It returns the value returned by the closure.
> + /// # use pin_init::stack_pin_init;
> + ///
> + /// fn assert_held<T, B: Backend>(guard: &Guard<'_, T, B>, lock: &Lock<T, B>) {
We need to remove the newline to avoid an empty line in the rendered output.
Cheers,
Miguel
Powered by blists - more mailing lists