summaryrefslogtreecommitdiff
path: root/Kernel/Assertions.h
diff options
context:
space:
mode:
authorTimon Kruiper <timonkruiper@gmail.com>2022-08-23 22:24:42 +0200
committerAndreas Kling <kling@serenityos.org>2022-08-26 12:51:57 +0200
commit47af812a234b7aa73b7f71f1c6b2e4cbea7159e3 (patch)
tree3a2609cfa27b49fd995d24f7030a12f8df9b0460 /Kernel/Assertions.h
parent026f37b031abc4948505894b6d6a98402e334716 (diff)
downloadserenity-47af812a234b7aa73b7f71f1c6b2e4cbea7159e3.zip
Kernel/aarch64: Implement `VERIFY_INTERRUPTS_{ENABLED, DISABLED}`
This requires to stub `Process::all_instances()`.
Diffstat (limited to 'Kernel/Assertions.h')
-rw-r--r--Kernel/Assertions.h9
1 files changed, 2 insertions, 7 deletions
diff --git a/Kernel/Assertions.h b/Kernel/Assertions.h
index d0933c0faa..deddab93c0 100644
--- a/Kernel/Assertions.h
+++ b/Kernel/Assertions.h
@@ -27,10 +27,5 @@ extern "C" {
#define TODO() __assertion_failed("TODO", __FILE__, __LINE__, __PRETTY_FUNCTION__)
-#if ARCH(I386) || ARCH(X86_64)
-# define VERIFY_INTERRUPTS_DISABLED() VERIFY(!(cpu_flags() & 0x200))
-# define VERIFY_INTERRUPTS_ENABLED() VERIFY(cpu_flags() & 0x200)
-#else
-# define VERIFY_INTERRUPTS_DISABLED() TODO()
-# define VERIFY_INTERRUPTS_ENABLED() TODO()
-#endif
+#define VERIFY_INTERRUPTS_DISABLED() VERIFY(!(Processor::are_interrupts_enabled()))
+#define VERIFY_INTERRUPTS_ENABLED() VERIFY(Processor::are_interrupts_enabled())