summaryrefslogtreecommitdiff
path: root/Kernel/Interrupts/IRQController.h
diff options
context:
space:
mode:
authorLiav A <liavalb@gmail.com>2020-02-28 22:33:41 +0200
committerAndreas Kling <kling@serenityos.org>2020-02-29 00:12:46 +0100
commit6f914ed0a4d5e5170f3d3a50573c55759e47061f (patch)
treed62298413f5b3ab25e1d67d4e856146763b75a4f /Kernel/Interrupts/IRQController.h
parentf96cf250f9427e2c563da2eecb0410fb4c3b1426 (diff)
downloadserenity-6f914ed0a4d5e5170f3d3a50573c55759e47061f.zip
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.
Diffstat (limited to 'Kernel/Interrupts/IRQController.h')
-rw-r--r--Kernel/Interrupts/IRQController.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/Kernel/Interrupts/IRQController.h b/Kernel/Interrupts/IRQController.h
index fe32376fbf..f27c5bd0f9 100644
--- a/Kernel/Interrupts/IRQController.h
+++ b/Kernel/Interrupts/IRQController.h
@@ -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() {}