mirror of
https://github.com/SerenityOS/serenity
synced 2026-05-11 17:37:00 +02:00
Linux did the same thing 18 years ago and their reasons for the change are similar to ours - https://github.com/torvalds/linux/commit/7d12e78 Most interrupt handlers (i.e. IRQ handlers) never used the register state reference anywhere so there's simply no need of passing it around. I didn't measure the performance boost but surely this change can't make things worse anyway.
28 lines
729 B
C++
28 lines
729 B
C++
/*
|
|
* Copyright (c) 2020, Liav A. <liavalb@hotmail.co.il>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#include <Kernel/Interrupts/UnhandledInterruptHandler.h>
|
|
#include <Kernel/Library/Panic.h>
|
|
|
|
namespace Kernel {
|
|
UnhandledInterruptHandler::UnhandledInterruptHandler(u8 interrupt_vector)
|
|
: GenericInterruptHandler(interrupt_vector)
|
|
{
|
|
}
|
|
|
|
bool UnhandledInterruptHandler::handle_interrupt()
|
|
{
|
|
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() = default;
|
|
}
|