mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:37:43 +00:00
Kernel/PCI: Break early of controller iteration over devices in OOM case
This is mainly useful when adding an HostController but due to OOM condition, we abort temporary Vector insertion of a DeviceIdentifier and then exit the iteration loop to report back the error if occured.
This commit is contained in:
parent
3fb289e27d
commit
428d4ae337
5 changed files with 18 additions and 13 deletions
|
@ -31,7 +31,7 @@ public:
|
|||
|
||||
u32 domain_number() const { return m_domain.domain_number(); }
|
||||
|
||||
virtual void enumerate_attached_devices(Function<void(DeviceIdentifier)> callback) = 0;
|
||||
virtual void enumerate_attached_devices(Function<IterationDecision(DeviceIdentifier)> callback) = 0;
|
||||
|
||||
protected:
|
||||
explicit HostController(PCI::Domain const& domain)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue