summaryrefslogtreecommitdiff
path: root/Kernel/Arch
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-12-14 13:41:45 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-12-14 16:16:37 +0100
commitf69257755962a3beaee2fbdfbdad0c3d4396843d (patch)
treea704af46dd9a2b92d53ace19f74e5fff7ba4054b /Kernel/Arch
parent8de5a0be4164e0db4401c9b6d5fd0c2799c52feb (diff)
downloadserenity-f69257755962a3beaee2fbdfbdad0c3d4396843d.zip
Kernel: Disable interrupts while modifying the PIC IMR
Diffstat (limited to 'Kernel/Arch')
-rw-r--r--Kernel/Arch/i386/PIC.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Kernel/Arch/i386/PIC.cpp b/Kernel/Arch/i386/PIC.cpp
index ae0d48ff05..82db9c188d 100644
--- a/Kernel/Arch/i386/PIC.cpp
+++ b/Kernel/Arch/i386/PIC.cpp
@@ -21,6 +21,7 @@ namespace PIC {
void disable(u8 irq)
{
+ InterruptDisabler disabler;
u8 imr;
if (irq & 8) {
imr = IO::in8(PIC1_CMD);
@@ -35,6 +36,7 @@ void disable(u8 irq)
void enable(u8 irq)
{
+ InterruptDisabler disabler;
u8 imr;
if (irq & 8) {
imr = IO::in8(PIC1_CMD);