Re: [PATCH 3/3] rust: miscdevice: adjust the rust_misc_device sample to use RegistrationData.

From: Alice Ryhl
Date: Tue Jan 21 2025 - 10:40:47 EST


On Sun, Jan 19, 2025 at 11:11 PM Christian Schrefl
<chrisi.schrefl@xxxxxxxxx> wrote:
>
> Share the mutex stored in RustMiscDevice between all instances using an Arc
> and the RegistrationData of MiscDeviceRegistration.
>
> This is mostly to Demonstrate the capability to share data in this way.
>
> Signed-off-by: Christian Schrefl <chrisi.schrefl@xxxxxxxxx>

This change causes all open files to share the same value, instead of
it being per-fd.

Alice