summaryrefslogtreecommitdiff
path: root/Kernel/Interrupts/GenericInterruptHandler.h
diff options
context:
space:
mode:
authorLiav A <liavalb@gmail.com>2021-06-05 09:00:18 +0300
committerAndreas Kling <kling@serenityos.org>2021-06-17 16:53:25 +0200
commitb91df26d4a14c2721d1920e76552012864c97790 (patch)
treef9b83151fe424057cbc7bbdd1e1b389387a601b7 /Kernel/Interrupts/GenericInterruptHandler.h
parent7a6d5a7b8bae2e2058c72b662c4cccec99374b11 (diff)
downloadserenity-b91df26d4a14c2721d1920e76552012864c97790.zip
Kernel/Interrupts: Return boolean on whether we handled the interrupt
If we are in a shared interrupt handler, the called handlers might indicate it was not their interrupt, so we should not increment the call counter of these handlers.
Diffstat (limited to 'Kernel/Interrupts/GenericInterruptHandler.h')
-rw-r--r--Kernel/Interrupts/GenericInterruptHandler.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/Kernel/Interrupts/GenericInterruptHandler.h b/Kernel/Interrupts/GenericInterruptHandler.h
index 368d03c0f0..b37c67772f 100644
--- a/Kernel/Interrupts/GenericInterruptHandler.h
+++ b/Kernel/Interrupts/GenericInterruptHandler.h
@@ -27,7 +27,9 @@ public:
{
VERIFY(!m_registered);
}
- virtual void handle_interrupt(const RegisterState& regs) = 0;
+ // Note: this method returns boolean value, to indicate if the handler handled
+ // the interrupt or not. This is useful for shared handlers mostly.
+ virtual bool handle_interrupt(const RegisterState& regs) = 0;
void will_be_destroyed();
bool is_registered() const { return m_registered; }