summaryrefslogtreecommitdiff
path: root/Kernel/Devices
diff options
context:
space:
mode:
Diffstat (limited to 'Kernel/Devices')
-rw-r--r--Kernel/Devices/DiskPartition.cpp4
-rw-r--r--Kernel/Devices/DiskPartition.h6
-rw-r--r--Kernel/Devices/FileBackedDiskDevice.cpp2
-rw-r--r--Kernel/Devices/FileBackedDiskDevice.h2
-rw-r--r--Kernel/Devices/IDEDiskDevice.cpp2
-rw-r--r--Kernel/Devices/IDEDiskDevice.h4
-rw-r--r--Kernel/Devices/MBRPartitionTable.cpp4
-rw-r--r--Kernel/Devices/MBRPartitionTable.h6
8 files changed, 15 insertions, 15 deletions
diff --git a/Kernel/Devices/DiskPartition.cpp b/Kernel/Devices/DiskPartition.cpp
index 34ebf00ea5..7fc60c733d 100644
--- a/Kernel/Devices/DiskPartition.cpp
+++ b/Kernel/Devices/DiskPartition.cpp
@@ -2,12 +2,12 @@
// #define OFFD_DEBUG
-Retained<DiskPartition> DiskPartition::create(Retained<DiskDevice>&& device, unsigned block_offset)
+NonnullRefPtr<DiskPartition> DiskPartition::create(NonnullRefPtr<DiskDevice>&& device, unsigned block_offset)
{
return adopt(*new DiskPartition(move(device), block_offset));
}
-DiskPartition::DiskPartition(Retained<DiskDevice>&& device, unsigned block_offset)
+DiskPartition::DiskPartition(NonnullRefPtr<DiskDevice>&& device, unsigned block_offset)
: m_device(move(device))
, m_block_offset(block_offset)
{
diff --git a/Kernel/Devices/DiskPartition.h b/Kernel/Devices/DiskPartition.h
index c4e1b39ee9..7db12eefc2 100644
--- a/Kernel/Devices/DiskPartition.h
+++ b/Kernel/Devices/DiskPartition.h
@@ -5,7 +5,7 @@
class DiskPartition final : public DiskDevice {
public:
- static Retained<DiskPartition> create(Retained<DiskDevice>&& device, unsigned block_offset);
+ static NonnullRefPtr<DiskPartition> create(NonnullRefPtr<DiskDevice>&& device, unsigned block_offset);
virtual ~DiskPartition();
virtual unsigned block_size() const override;
@@ -17,8 +17,8 @@ public:
private:
virtual const char* class_name() const override;
- DiskPartition(Retained<DiskDevice>&&, unsigned);
+ DiskPartition(NonnullRefPtr<DiskDevice>&&, unsigned);
- Retained<DiskDevice> m_device;
+ NonnullRefPtr<DiskDevice> m_device;
unsigned m_block_offset;
};
diff --git a/Kernel/Devices/FileBackedDiskDevice.cpp b/Kernel/Devices/FileBackedDiskDevice.cpp
index b56aaff6d6..8b05e6e697 100644
--- a/Kernel/Devices/FileBackedDiskDevice.cpp
+++ b/Kernel/Devices/FileBackedDiskDevice.cpp
@@ -7,7 +7,7 @@
//#define FBBD_DEBUG
#define IGNORE_FILE_LENGTH // Useful for e.g /dev/hda2
-RetainPtr<FileBackedDiskDevice> FileBackedDiskDevice::create(String&& image_path, unsigned block_size)
+RefPtr<FileBackedDiskDevice> FileBackedDiskDevice::create(String&& image_path, unsigned block_size)
{
return adopt(*new FileBackedDiskDevice(move(image_path), block_size));
}
diff --git a/Kernel/Devices/FileBackedDiskDevice.h b/Kernel/Devices/FileBackedDiskDevice.h
index 667f3af427..580f3b531d 100644
--- a/Kernel/Devices/FileBackedDiskDevice.h
+++ b/Kernel/Devices/FileBackedDiskDevice.h
@@ -8,7 +8,7 @@
class FileBackedDiskDevice final : public DiskDevice {
public:
- static RetainPtr<FileBackedDiskDevice> create(String&& image_path, unsigned block_size);
+ static RefPtr<FileBackedDiskDevice> create(String&& image_path, unsigned block_size);
virtual ~FileBackedDiskDevice() override;
bool is_valid() const { return m_file; }
diff --git a/Kernel/Devices/IDEDiskDevice.cpp b/Kernel/Devices/IDEDiskDevice.cpp
index 4c50915e61..5778805981 100644
--- a/Kernel/Devices/IDEDiskDevice.cpp
+++ b/Kernel/Devices/IDEDiskDevice.cpp
@@ -78,7 +78,7 @@
#define ATA_REG_ALTSTATUS 0x0C
#define ATA_REG_DEVADDRESS 0x0D
-Retained<IDEDiskDevice> IDEDiskDevice::create()
+NonnullRefPtr<IDEDiskDevice> IDEDiskDevice::create()
{
return adopt(*new IDEDiskDevice);
}
diff --git a/Kernel/Devices/IDEDiskDevice.h b/Kernel/Devices/IDEDiskDevice.h
index 7f5cfbd99e..da5f491516 100644
--- a/Kernel/Devices/IDEDiskDevice.h
+++ b/Kernel/Devices/IDEDiskDevice.h
@@ -18,7 +18,7 @@ class IDEDiskDevice final : public IRQHandler
, public DiskDevice {
AK_MAKE_ETERNAL
public:
- static Retained<IDEDiskDevice> create();
+ static NonnullRefPtr<IDEDiskDevice> create();
virtual ~IDEDiskDevice() override;
// ^DiskDevice
@@ -55,7 +55,7 @@ private:
PCI::Address m_pci_address;
PhysicalRegionDescriptor m_prdt;
- RetainPtr<PhysicalPage> m_dma_buffer_page;
+ RefPtr<PhysicalPage> m_dma_buffer_page;
word m_bus_master_base { 0 };
Lockable<bool> m_dma_enabled;
};
diff --git a/Kernel/Devices/MBRPartitionTable.cpp b/Kernel/Devices/MBRPartitionTable.cpp
index b194855b3e..2d4f733c93 100644
--- a/Kernel/Devices/MBRPartitionTable.cpp
+++ b/Kernel/Devices/MBRPartitionTable.cpp
@@ -3,7 +3,7 @@
#define MBR_DEBUG
-MBRPartitionTable::MBRPartitionTable(Retained<DiskDevice>&& device)
+MBRPartitionTable::MBRPartitionTable(NonnullRefPtr<DiskDevice>&& device)
: m_device(move(device))
{
}
@@ -37,7 +37,7 @@ bool MBRPartitionTable::initialize()
return true;
}
-RetainPtr<DiskPartition> MBRPartitionTable::partition(unsigned index)
+RefPtr<DiskPartition> MBRPartitionTable::partition(unsigned index)
{
ASSERT(index >= 1 && index <= 4);
diff --git a/Kernel/Devices/MBRPartitionTable.h b/Kernel/Devices/MBRPartitionTable.h
index a3ad937b2c..d5ca9b138f 100644
--- a/Kernel/Devices/MBRPartitionTable.h
+++ b/Kernel/Devices/MBRPartitionTable.h
@@ -31,14 +31,14 @@ class MBRPartitionTable {
AK_MAKE_ETERNAL
public:
- MBRPartitionTable(Retained<DiskDevice>&& device);
+ MBRPartitionTable(NonnullRefPtr<DiskDevice>&& device);
~MBRPartitionTable();
bool initialize();
- RetainPtr<DiskPartition> partition(unsigned index);
+ RefPtr<DiskPartition> partition(unsigned index);
private:
- Retained<DiskDevice> m_device;
+ NonnullRefPtr<DiskDevice> m_device;
ByteBuffer read_header() const;
const MBRPartitionHeader& header() const;