summaryrefslogtreecommitdiff
path: root/Kernel/Arch/x86/InterruptDisabler.h
diff options
context:
space:
mode:
authorTimon Kruiper <timonkruiper@gmail.com>2022-05-16 14:42:49 +0200
committerLinus Groh <mail@linusgroh.de>2022-06-02 13:14:12 +0100
commita4534678f978c7ea62b70bc8ab4bdc8f6437f90a (patch)
tree05d79a605c96f8bf8ab9afc1c87c464f78e8ca34 /Kernel/Arch/x86/InterruptDisabler.h
parentea9cf8b6ab6a3941ecb4727723e8e38fbd6b4bb8 (diff)
downloadserenity-a4534678f978c7ea62b70bc8ab4bdc8f6437f90a.zip
Kernel: Implement InterruptDisabler using generic Processor functions
Now that the code does not use architectural specific code, it is moved to the generic Arch directory and the paths are modified accordingly.
Diffstat (limited to 'Kernel/Arch/x86/InterruptDisabler.h')
-rw-r--r--Kernel/Arch/x86/InterruptDisabler.h38
1 files changed, 0 insertions, 38 deletions
diff --git a/Kernel/Arch/x86/InterruptDisabler.h b/Kernel/Arch/x86/InterruptDisabler.h
deleted file mode 100644
index 941ddaab2b..0000000000
--- a/Kernel/Arch/x86/InterruptDisabler.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org>
- *
- * SPDX-License-Identifier: BSD-2-Clause
- */
-
-#pragma once
-
-#include <AK/Types.h>
-
-#include <Kernel/Arch/x86/IO.h>
-
-#include <Kernel/Arch/x86/ASM_wrapper.h>
-
-#include <AK/Platform.h>
-VALIDATE_IS_X86()
-
-namespace Kernel {
-
-class InterruptDisabler {
-public:
- InterruptDisabler()
- {
- m_flags = cpu_flags();
- cli();
- }
-
- ~InterruptDisabler()
- {
- if ((m_flags & 0x200) != 0)
- sti();
- }
-
-private:
- u32 m_flags;
-};
-
-}