diff options
author | James Mintram <me@jamesrm.com> | 2021-11-30 22:59:05 +0000 |
---|---|---|
committer | Brian Gianforcaro <b.gianfo@gmail.com> | 2021-12-01 11:22:04 -0800 |
commit | 1c86b7043b6d260159eade345ee3f19955153126 (patch) | |
tree | ab9acbb971e31ed8de0e4ffb2c194efa2035ae56 /Kernel | |
parent | bf79c731583d3d887b23fb9d9ef5fde9af35a9e1 (diff) | |
download | serenity-1c86b7043b6d260159eade345ee3f19955153126.zip |
Kernel: Remove ASM_Wrapper include from platform independent processor.h
Diffstat (limited to 'Kernel')
-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> |