Kernel: Disable interrupts while modifying the PIC IMR
This commit is contained in:
parent
8de5a0be41
commit
f692577559
Notes:
sideshowbarker
2024-07-19 10:51:45 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/f6925775596
1 changed files with 2 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue