From 752ae0d0c23d1edf9b2ce563c4e82283dffd273a Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Sat, 24 Feb 2024 18:33:42 -0500 Subject: kernel/amd64: cpu: Fix logic bug This commit fixes a logic bug in amd64_isr_intr_mask(). We want to return a bool that indicates if interrupts are masked (bit 9 of rflags unset) Signed-off-by: Ian Moffett --- sys/include/arch/amd64/cpu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/include/arch/amd64/cpu.h b/sys/include/arch/amd64/cpu.h index 7186a5f..e2ed851 100644 --- a/sys/include/arch/amd64/cpu.h +++ b/sys/include/arch/amd64/cpu.h @@ -95,7 +95,7 @@ amd64_is_intr_mask(void) uint64_t flags; __ASMV("pushfq; pop %0" : "=rm" (flags) :: "memory"); - return __TEST(flags, 1 << 9); + return !__TEST(flags, 1 << 9); } static inline void -- cgit v1.2.3