mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:47:35 +00:00
Kernel: Make self-contained locking smart pointers their own classes
Until now, our kernel has reimplemented a number of AK classes to provide automatic internal locking: - RefPtr - NonnullRefPtr - WeakPtr - Weakable This patch renames the Kernel classes so that they can coexist with the original AK classes: - RefPtr => LockRefPtr - NonnullRefPtr => NonnullLockRefPtr - WeakPtr => LockWeakPtr - Weakable => LockWeakable The goal here is to eventually get rid of the Lock* classes in favor of using external locking.
This commit is contained in:
parent
e475263113
commit
11eee67b85
360 changed files with 1703 additions and 1672 deletions
|
@ -14,7 +14,7 @@ class AsyncBlockDeviceRequest;
|
|||
|
||||
class ATAPort
|
||||
: public AtomicRefCounted<ATAPort>
|
||||
, public Weakable<ATAPort> {
|
||||
, public LockWeakable<ATAPort> {
|
||||
|
||||
friend class ATAPortInterruptDisabler;
|
||||
friend class ATAPortInterruptCleaner;
|
||||
|
@ -50,7 +50,7 @@ public:
|
|||
};
|
||||
|
||||
public:
|
||||
RefPtr<StorageDevice> connected_device(size_t device_index) const;
|
||||
LockRefPtr<StorageDevice> connected_device(size_t device_index) const;
|
||||
|
||||
virtual ~ATAPort() = default;
|
||||
|
||||
|
@ -139,18 +139,18 @@ protected:
|
|||
|
||||
EntropySource m_entropy_source;
|
||||
|
||||
RefPtr<AsyncBlockDeviceRequest> m_current_request;
|
||||
LockRefPtr<AsyncBlockDeviceRequest> m_current_request;
|
||||
u64 m_current_request_block_index { 0 };
|
||||
bool m_current_request_flushing_cache { false };
|
||||
|
||||
OwnPtr<Memory::Region> m_prdt_region;
|
||||
OwnPtr<Memory::Region> m_dma_buffer_region;
|
||||
RefPtr<Memory::PhysicalPage> m_prdt_page;
|
||||
RefPtr<Memory::PhysicalPage> m_dma_buffer_page;
|
||||
LockRefPtr<Memory::PhysicalPage> m_prdt_page;
|
||||
LockRefPtr<Memory::PhysicalPage> m_dma_buffer_page;
|
||||
|
||||
const u8 m_port_index;
|
||||
NonnullRefPtrVector<ATADevice> m_ata_devices;
|
||||
NonnullLockRefPtrVector<ATADevice> m_ata_devices;
|
||||
NonnullOwnPtr<KBuffer> m_ata_identify_data_buffer;
|
||||
NonnullRefPtr<ATAController> m_parent_ata_controller;
|
||||
NonnullLockRefPtr<ATAController> m_parent_ata_controller;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue