kernel: irq: disable irqs during handler

This fixes issue #1, which correctly noted the comment was correct but
the code implementation was not correct.

Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
Sean Cross 2020-09-22 14:41:31 +08:00
parent f1353e8ff0
commit 6d931ccc33

View file

@ -50,7 +50,7 @@ pub fn interrupt_claim(
// Unsafe is required since we're accessing a static mut array.
// However, we disable interrupts to prevent contention on this array.
unsafe {
arch::irq::enable_all_irqs();
arch::irq::disable_all_irqs();
let result = if irq > IRQ_HANDLERS.len() {
Err(xous_kernel::Error::InterruptNotFound)
} else if IRQ_HANDLERS[irq].is_some() {