Re: [PATCH 1/3] rust: Introduce irq module

From: Boqun Feng
Date: Fri Jul 26 2024 - 17:22:17 EST


On Thu, Jul 25, 2024 at 06:27:50PM -0400, Lyude Paul wrote:
[...]
> +pub struct IrqDisabled<'a>(PhantomData<&'a ()>);

I think you need to make this type !Send and !Sync (because you are
going to make it Copy). Otherwise, you will be able to pass the irq
disabled token to another thread on a different CPU which doesn't have
irq disabled.

Regards,
Boqun