1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:18:13 +00:00

Kernel: Fix counting interrupts

Move counting interrupts out of the handle_interrupt method so that
it is done in all cases without the interrupt handler having to
implement it explicitly.

Also make the counter an atomic value as e.g. the LocalAPIC interrupts
may be triggered on multiple processors simultaneously.

Fixes #4297
This commit is contained in:
Tom 2020-12-02 09:41:52 -07:00 committed by Andreas Kling
parent aec8983819
commit 5e08ae4e14
4 changed files with 12 additions and 11 deletions

View file

@ -87,7 +87,6 @@ SharedIRQHandler::~SharedIRQHandler()
void SharedIRQHandler::handle_interrupt(const RegisterState& regs)
{
ASSERT_INTERRUPTS_DISABLED();
increment_invoking_counter();
#ifdef INTERRUPT_DEBUG
dbg() << "Interrupt @ " << interrupt_number();
dbg() << "Interrupt Handlers registered - " << m_handlers.size();