mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-24 00:24:38 +00:00
Kernel: Make IDEChannel Ref-counted
Technically not supported by the original ATA specification, IDE hot swapping is still in practice possible, so the only sane way to start support it is with ref-counting the IDEChannel object so if we remove a PATADiskDevice, it's not gone with it.
This commit is contained in:
@@ -45,9 +45,9 @@ namespace Kernel {
|
||||
#define PCI_Mass_Storage_Class 0x1
|
||||
#define PCI_IDE_Controller_Subclass 0x1
|
||||
|
||||
UNMAP_AFTER_INIT NonnullOwnPtr<IDEChannel> IDEChannel::create(const IDEController& controller, IOAddressGroup io_group, ChannelType type, bool force_pio)
|
||||
UNMAP_AFTER_INIT NonnullRefPtr<IDEChannel> IDEChannel::create(const IDEController& controller, IOAddressGroup io_group, ChannelType type, bool force_pio)
|
||||
{
|
||||
return make<IDEChannel>(controller, io_group, type, force_pio);
|
||||
return adopt(*new IDEChannel(controller, io_group, type, force_pio));
|
||||
}
|
||||
|
||||
RefPtr<StorageDevice> IDEChannel::master_device() const
|
||||
|
||||
Reference in New Issue
Block a user