summaryrefslogtreecommitdiff
path: root/Kernel/Arch/x86/common/TrapFrame.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Kernel/Arch/x86/common/TrapFrame.cpp')
-rw-r--r--Kernel/Arch/x86/common/TrapFrame.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/Kernel/Arch/x86/common/TrapFrame.cpp b/Kernel/Arch/x86/common/TrapFrame.cpp
new file mode 100644
index 0000000000..a5e4468d34
--- /dev/null
+++ b/Kernel/Arch/x86/common/TrapFrame.cpp
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org>
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ */
+
+#include <Kernel/Arch/x86/TrapFrame.h>
+
+namespace Kernel {
+
+extern "C" void enter_trap_no_irq(TrapFrame* trap)
+{
+ InterruptDisabler disable;
+ Processor::current().enter_trap(*trap, false);
+}
+
+extern "C" void enter_trap(TrapFrame* trap)
+{
+ InterruptDisabler disable;
+ Processor::current().enter_trap(*trap, true);
+}
+
+extern "C" void exit_trap(TrapFrame* trap)
+{
+ InterruptDisabler disable;
+ return Processor::current().exit_trap(*trap);
+}
+
+}