From 6d931ccc3329ae030384101b16b2239570664ecf Mon Sep 17 00:00:00 2001 From: Sean Cross Date: Tue, 22 Sep 2020 14:41:31 +0800 Subject: [PATCH] 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 --- kernel/src/irq.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/src/irq.rs b/kernel/src/irq.rs index 825805dcc..f4935c45d 100644 --- a/kernel/src/irq.rs +++ b/kernel/src/irq.rs @@ -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() {