mirror of
https://github.com/RGBCube/serenity
synced 2025-05-18 22:05:07 +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:
parent
756a73471e
commit
8944ca830f
8 changed files with 2 additions and 10 deletions
|
@ -361,7 +361,7 @@ void register_generic_interrupt_handler(u8 interrupt_number, GenericInterruptHan
|
||||||
handler_slot = &handler;
|
handler_slot = &handler;
|
||||||
return;
|
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);
|
VERIFY(handler_slot->type() == HandlerType::SharedIRQHandler);
|
||||||
static_cast<SharedIRQHandler*>(handler_slot)->register_handler(handler);
|
static_cast<SharedIRQHandler*>(handler_slot)->register_handler(handler);
|
||||||
return;
|
return;
|
||||||
|
@ -390,7 +390,7 @@ void unregister_generic_interrupt_handler(u8 interrupt_number, GenericInterruptH
|
||||||
VERIFY(handler_slot != nullptr);
|
VERIFY(handler_slot != nullptr);
|
||||||
if (handler_slot->type() == HandlerType::UnhandledInterruptHandler)
|
if (handler_slot->type() == HandlerType::UnhandledInterruptHandler)
|
||||||
return;
|
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);
|
VERIFY(handler_slot->type() == HandlerType::SharedIRQHandler);
|
||||||
auto* shared_handler = static_cast<SharedIRQHandler*>(handler_slot);
|
auto* shared_handler = static_cast<SharedIRQHandler*>(handler_slot);
|
||||||
shared_handler->unregister_handler(handler);
|
shared_handler->unregister_handler(handler);
|
||||||
|
|
|
@ -84,7 +84,6 @@ public:
|
||||||
|
|
||||||
virtual size_t sharing_devices_count() const override { return 0; }
|
virtual size_t sharing_devices_count() const override { return 0; }
|
||||||
virtual bool is_shared_handler() const override { return false; }
|
virtual bool is_shared_handler() const override { return false; }
|
||||||
virtual bool is_sharing_with_others() const override { return false; }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
};
|
};
|
||||||
|
@ -115,7 +114,6 @@ public:
|
||||||
|
|
||||||
virtual size_t sharing_devices_count() const override { return 0; }
|
virtual size_t sharing_devices_count() const override { return 0; }
|
||||||
virtual bool is_shared_handler() const override { return false; }
|
virtual bool is_shared_handler() const override { return false; }
|
||||||
virtual bool is_sharing_with_others() const override { return false; }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
};
|
};
|
||||||
|
|
|
@ -41,7 +41,6 @@ public:
|
||||||
|
|
||||||
virtual size_t sharing_devices_count() const = 0;
|
virtual size_t sharing_devices_count() const = 0;
|
||||||
virtual bool is_shared_handler() const = 0;
|
virtual bool is_shared_handler() const = 0;
|
||||||
virtual bool is_sharing_with_others() const = 0;
|
|
||||||
|
|
||||||
virtual HandlerType type() const = 0;
|
virtual HandlerType type() const = 0;
|
||||||
virtual StringView purpose() const = 0;
|
virtual StringView purpose() const = 0;
|
||||||
|
|
|
@ -31,7 +31,6 @@ public:
|
||||||
|
|
||||||
virtual size_t sharing_devices_count() const override { return 0; }
|
virtual size_t sharing_devices_count() const override { return 0; }
|
||||||
virtual bool is_shared_handler() const override { return false; }
|
virtual bool is_shared_handler() const override { return false; }
|
||||||
virtual bool is_sharing_with_others() const override { return m_shared_with_others; }
|
|
||||||
void set_shared_with_others(bool status) { m_shared_with_others = status; }
|
void set_shared_with_others(bool status) { m_shared_with_others = status; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -33,7 +33,6 @@ public:
|
||||||
return m_handlers.with([](auto& list) { return list.size_slow(); });
|
return m_handlers.with([](auto& list) { return list.size_slow(); });
|
||||||
}
|
}
|
||||||
virtual bool is_shared_handler() const override { return true; }
|
virtual bool is_shared_handler() const override { return true; }
|
||||||
virtual bool is_sharing_with_others() const override { return false; }
|
|
||||||
|
|
||||||
virtual HandlerType type() const override { return HandlerType::SharedIRQHandler; }
|
virtual HandlerType type() const override { return HandlerType::SharedIRQHandler; }
|
||||||
virtual StringView purpose() const override { return "Shared IRQ Handler"sv; }
|
virtual StringView purpose() const override { return "Shared IRQ Handler"sv; }
|
||||||
|
|
|
@ -28,7 +28,6 @@ public:
|
||||||
|
|
||||||
virtual size_t sharing_devices_count() const override { return 1; }
|
virtual size_t sharing_devices_count() const override { return 1; }
|
||||||
virtual bool is_shared_handler() const override { return false; }
|
virtual bool is_shared_handler() const override { return false; }
|
||||||
virtual bool is_sharing_with_others() const override { return false; }
|
|
||||||
|
|
||||||
virtual HandlerType type() const override { return HandlerType::SpuriousInterruptHandler; }
|
virtual HandlerType type() const override { return HandlerType::SpuriousInterruptHandler; }
|
||||||
virtual StringView purpose() const override;
|
virtual StringView purpose() const override;
|
||||||
|
|
|
@ -25,7 +25,6 @@ public:
|
||||||
|
|
||||||
virtual size_t sharing_devices_count() const override { return 0; }
|
virtual size_t sharing_devices_count() const override { return 0; }
|
||||||
virtual bool is_shared_handler() const override { return false; }
|
virtual bool is_shared_handler() const override { return false; }
|
||||||
virtual bool is_sharing_with_others() const override { return false; }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
};
|
};
|
||||||
|
|
|
@ -133,7 +133,6 @@ public:
|
||||||
|
|
||||||
virtual size_t sharing_devices_count() const override { return 0; }
|
virtual size_t sharing_devices_count() const override { return 0; }
|
||||||
virtual bool is_shared_handler() const override { return false; }
|
virtual bool is_shared_handler() const override { return false; }
|
||||||
virtual bool is_sharing_with_others() const override { return false; }
|
|
||||||
virtual HandlerType type() const override { return HandlerType::IRQHandler; }
|
virtual HandlerType type() const override { return HandlerType::IRQHandler; }
|
||||||
virtual StringView controller() const override { return {}; }
|
virtual StringView controller() const override { return {}; }
|
||||||
virtual bool eoi() override;
|
virtual bool eoi() override;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue