summaryrefslogtreecommitdiff
path: root/sys/include
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-02-24 18:33:42 -0500
committerIan Moffett <ian@osmora.org>2024-02-24 18:35:37 -0500
commit752ae0d0c23d1edf9b2ce563c4e82283dffd273a (patch)
treebeb619d65af3a051c365b78d9c268d3acb4915c3 /sys/include
parent839034c1309bc331e4a44c8e0153f013a93ba5b5 (diff)
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 <ian@osmora.org>
Diffstat (limited to 'sys/include')
-rw-r--r--sys/include/arch/amd64/cpu.h2
1 files changed, 1 insertions, 1 deletions
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