mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-07 00:29:15 +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
Notes:
sideshowbarker
2024-07-18 21:02:06 +09:00
Author: https://github.com/supercomputer7
Commit: dfb6b296cf
Pull-request: https://github.com/SerenityOS/serenity/pull/5971
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