Conversation
This makes them safer to operate on inside IRQ handlers.
ioeddk
left a comment
There was a problem hiding this comment.
LGTM.
Additional comment: the SpinLock class says:
/// The guard behavior can be temporarily upgraded from [`PreemptDisabled`] to
/// [`LocalIrqDisabled`] using the [`disable_irq`] method.
///
/// [`disable_irq`]: Self::disable_irq
So if we don't want to disable IRQ in every OQueue, we can keep it preempt disabled only, and disable it ad hoc.
That would have been the "minimal" case I was thinking about. I think for any given OQueue either no access or all accesses need to disable IRQs, so ad-hoc usage is error prone. Maybe with the new OQueue we need a way to create "IRQ-safe" OQueues which do this disabling and normal ones which panic if accessed from an IRQ context. I'm not going to merge this at the moment. It's definitely possible it breaks something and I don't want to make |
This makes them safer to operate on inside IRQ handlers.