Re: [PATCH v3 09/27] rust: device: implement Sync for Device<Bound>
From: Gary Guo
Date: Tue May 19 2026 - 09:10:03 EST
On Sun May 17, 2026 at 1:00 AM BST, Danilo Krummrich wrote:
> Implement Sync for Device<Bound> in addition to Device<Normal>.
>
> Device<Bound> uses the same underlying struct device as Device<Normal>;
> Bound is a zero-sized type-state marker that does not affect thread
> safety.
>
> This is needed for types that hold &'bound Device<Bound>, such as
> io::mem::IoMem, to be Send.
>
> Signed-off-by: Danilo Krummrich <dakr@xxxxxxxxxx>
Reviewed-by: Gary Guo <gary@xxxxxxxxxxx>
> ---
> rust/kernel/device.rs | 4 ++++
> 1 file changed, 4 insertions(+)