1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 01:57:45 +00:00

Kernel: Remove is_sharing_with_others API from GenericInterruptHandler

is_sharing_with_others API was never really put to use properly since
it was introduced. The only place where it is used in Interrupts.cpp is
in conjuction with is_shared_handler() which is only true for
SharedIRQHandler and is_sharing_with_others will always return false.

Remove that API.
This commit is contained in:
Pankaj Raghav 2023-04-12 22:55:20 +02:00 committed by Andreas Kling
parent 756a73471e
commit 8944ca830f
8 changed files with 2 additions and 10 deletions

View file

@ -361,7 +361,7 @@ void register_generic_interrupt_handler(u8 interrupt_number, GenericInterruptHan
handler_slot = &handler;
return;
}
if (handler_slot->is_shared_handler() && !handler_slot->is_sharing_with_others()) {
if (handler_slot->is_shared_handler()) {
VERIFY(handler_slot->type() == HandlerType::SharedIRQHandler);
static_cast<SharedIRQHandler*>(handler_slot)->register_handler(handler);
return;
@ -390,7 +390,7 @@ void unregister_generic_interrupt_handler(u8 interrupt_number, GenericInterruptH
VERIFY(handler_slot != nullptr);
if (handler_slot->type() == HandlerType::UnhandledInterruptHandler)
return;
if (handler_slot->is_shared_handler() && !handler_slot->is_sharing_with_others()) {
if (handler_slot->is_shared_handler()) {
VERIFY(handler_slot->type() == HandlerType::SharedIRQHandler);
auto* shared_handler = static_cast<SharedIRQHandler*>(handler_slot);
shared_handler->unregister_handler(handler);