ladybird/Kernel/Interrupts/UnhandledInterruptHandler.cpp
Liav A b91df26d4a 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.
2021-06-17 16:53:25 +02:00

30 lines
734 B
C++

/*
* Copyright (c) 2020, Liav A. <liavalb@hotmail.co.il>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <Kernel/Interrupts/UnhandledInterruptHandler.h>
#include <Kernel/Panic.h>
namespace Kernel {
UnhandledInterruptHandler::UnhandledInterruptHandler(u8 interrupt_vector)
: GenericInterruptHandler(interrupt_vector)
{
}
bool UnhandledInterruptHandler::handle_interrupt(const RegisterState&)
{
PANIC("Interrupt: Unhandled vector {} was invoked for handle_interrupt(RegisterState&).", interrupt_number());
}
[[noreturn]] bool UnhandledInterruptHandler::eoi()
{
PANIC("Interrupt: Unhandled vector {} was invoked for eoi().", interrupt_number());
}
UnhandledInterruptHandler::~UnhandledInterruptHandler()
{
}
}