mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 00:37:34 +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:
parent
531037db7e
commit
dfb6b296cf
5 changed files with 11 additions and 9 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue