mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:38:12 +00:00
Net: Make NetworkAdapter reference-counted
The idea behind WeakPtr<NetworkAdapter> was to support hot-pluggable network adapters, but on closer thought, that's super impractical so let's not go down that road.
This commit is contained in:
parent
f3a5985bb2
commit
a3f39fe789
7 changed files with 19 additions and 19 deletions
|
@ -132,7 +132,7 @@ void RTL8139NetworkAdapter::detect(const PCI::Address& address)
|
|||
if (id != rtl8139_id)
|
||||
return;
|
||||
u8 irq = PCI::get_interrupt_line(address);
|
||||
new RTL8139NetworkAdapter(address, irq);
|
||||
(void)adopt(*new RTL8139NetworkAdapter(address, irq)).leak_ref();
|
||||
}
|
||||
|
||||
RTL8139NetworkAdapter::RTL8139NetworkAdapter(PCI::Address pci_address, u8 irq)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue