Kernel: Disable interrupts while modifying the PIC IMR

This commit is contained in:
Andreas Kling 2019-12-14 13:41:45 +01:00
parent 8de5a0be41
commit f692577559
Notes: sideshowbarker 2024-07-19 10:51:45 +09:00

View File

@ -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);