1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 09:14:58 +00:00

Kernel: Store IRQControllers in NonnullRefPtrs instead of RefPtrs

These are always non-null, so there's no point in storing them in a
nullable container.
This commit is contained in:
Idan Horowitz 2022-09-25 15:25:14 +03:00
parent 176989d811
commit 9abbeff79f
8 changed files with 13 additions and 15 deletions

View file

@ -25,7 +25,6 @@ bool IRQHandler::eoi()
{
dbgln_if(IRQ_DEBUG, "EOI IRQ {}", interrupt_number());
if (!m_shared_with_others) {
VERIFY(!m_responsible_irq_controller.is_null());
m_responsible_irq_controller->eoi(*this);
return true;
}

View file

@ -40,7 +40,7 @@ protected:
private:
bool m_shared_with_others { false };
bool m_enabled { false };
LockRefPtr<IRQController> m_responsible_irq_controller;
NonnullLockRefPtr<IRQController> m_responsible_irq_controller;
};
}

View file

@ -41,6 +41,6 @@ private:
explicit SharedIRQHandler(u8 interrupt_number);
bool m_enabled { true };
GenericInterruptHandler::List m_handlers;
LockRefPtr<IRQController> m_responsible_irq_controller;
NonnullLockRefPtr<IRQController> m_responsible_irq_controller;
};
}

View file

@ -42,7 +42,7 @@ private:
explicit SpuriousInterruptHandler(u8 interrupt_number);
bool m_enabled { false };
bool m_real_irq { false };
LockRefPtr<IRQController> m_responsible_irq_controller;
NonnullLockRefPtr<IRQController> m_responsible_irq_controller;
OwnPtr<GenericInterruptHandler> m_real_handler;
};
}