Re: [PATCH v9 7/9] rust: sync: Introduce lock::Backend::Context

From: Dirk Behme
Date: Mon Mar 03 2025 - 09:23:52 EST


On 27.02.25 23:10, Lyude Paul wrote:
> Now that we've introduced an `InterruptDisabled` token for marking
> contexts in which IRQs are disabled, we can have a way to avoid
> `SpinLockIrq` disabling interrupts if the interrupts have already been
> disabled. Basically, a `SpinLockIrq` should work like a `SpinLock` if
> interrupts are disabled. So a function:
>
> (&'a SpinLockIrq, &'a InterruptDisabled) -> Guard<'a, .., SpinLockBackend>
>
> makes senses. Note that due to `Guard` and `InterruptDisabled` has the
> same lifetime, interrupts cannot be enabled whiel the Guard exists.

Typos:

has -> having
whiel -> while

?

Cheers,

Dirk