1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:17:44 +00:00

Kernel: Simplify interrupt management

The IRQController object is RefCounted, and is shared between the
InterruptManagement class & IRQ handlers' classes.

IRQHandler, SharedIRQHandler & SpuriousInterruptHandler classes
use a responsible IRQ controller directly instead of calling
InterruptManagement for disable(), enable() or eoi().

Also, the initialization process of InterruptManagement is
simplified, so it doesn't rely on an ACPI parser to be initialized.
This commit is contained in:
Liav A 2020-02-28 22:33:41 +02:00 committed by Andreas Kling
parent f96cf250f9
commit 6f914ed0a4
9 changed files with 80 additions and 128 deletions

View file

@ -26,6 +26,7 @@
#pragma once
#include <AK/RefCounted.h>
#include <AK/String.h>
#include <AK/Types.h>
@ -36,7 +37,7 @@ enum class IRQControllerType {
i82093AA = 2 /* Intel 82093AA I/O ADVANCED PROGRAMMABLE INTERRUPT CONTROLLER (IOAPIC) */
};
class IRQController {
class IRQController : public RefCounted<IRQController> {
public:
virtual ~IRQController() {}