Re: [PATCH v3 2/2] rust: sync: Make Guard::new() public
From: Alice Ryhl
Date: Fri Nov 01 2024 - 05:11:34 EST
On Fri, Nov 1, 2024 at 12:10 AM Lyude Paul <lyude@xxxxxxxxxx> wrote:
>
> Since we added a Lock::from_raw() function previously, it makes sense to
> also introduce an interface for creating a Guard from a reference to a Lock
> for instances where we've derived the Lock from a raw pointer and know that
> the lock is already acquired, something we do in the KMS API.
>
> Signed-off-by: Lyude Paul <lyude@xxxxxxxxxx>
Reviewed-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>