diff options
-rw-r--r-- | Kernel/Arch/Processor.h | 1 | ||||
-rw-r--r-- | Kernel/Assertions.h | 13 | ||||
-rw-r--r-- | Kernel/Process.h | 1 |
3 files changed, 11 insertions, 4 deletions
diff --git a/Kernel/Arch/Processor.h b/Kernel/Arch/Processor.h index 804cb1da08..c7925db4b2 100644 --- a/Kernel/Arch/Processor.h +++ b/Kernel/Arch/Processor.h @@ -8,7 +8,6 @@ #pragma once #include <AK/Function.h> -#include <Kernel/Arch/x86/ASM_wrapper.h> namespace Kernel { diff --git a/Kernel/Assertions.h b/Kernel/Assertions.h index 6ebab7fa5b..c292984c96 100644 --- a/Kernel/Assertions.h +++ b/Kernel/Assertions.h @@ -6,6 +6,8 @@ #pragma once +#include <AK/Platform.h> + #define __STRINGIFY_HELPER(x) #x #define __STRINGIFY(x) __STRINGIFY_HELPER(x) @@ -23,8 +25,13 @@ extern "C" { [[noreturn]] void abort(); } -#define VERIFY_INTERRUPTS_DISABLED() VERIFY(!(cpu_flags() & 0x200)) -#define VERIFY_INTERRUPTS_ENABLED() VERIFY(cpu_flags() & 0x200) - static constexpr bool TODO = false; #define TODO() VERIFY(TODO) + +#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 diff --git a/Kernel/Process.h b/Kernel/Process.h index 0143a10da8..3184fab5b4 100644 --- a/Kernel/Process.h +++ b/Kernel/Process.h @@ -18,6 +18,7 @@ #include <AK/WeakPtr.h> #include <AK/Weakable.h> #include <Kernel/API/Syscall.h> +#include <Kernel/Assertions.h> #include <Kernel/AtomicEdgeAction.h> #include <Kernel/FileSystem/InodeMetadata.h> #include <Kernel/FileSystem/OpenFileDescription.h> |