summaryrefslogtreecommitdiffhomepage
path: root/src/kernel/StorageKit
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-12-22 07:38:52 +0100
committerAmlal El Mahrouss <amlal@nekernel.org>2025-12-22 07:42:26 +0100
commit36dee4f0d8ea806b2f061ed66a89e812ab007ed2 (patch)
tree8fe0f6895abb96eb40ee390d6411099b4decf489 /src/kernel/StorageKit
parentf7023f6a08e117d483b5928fd4301062a3384abf (diff)
feat: test: Add `kout` test and rename DeviceInterface to IDevice in KernelKit.
introduce UserPtr and unburden vettable by removing the IVettable helper. Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'src/kernel/StorageKit')
-rw-r--r--src/kernel/StorageKit/AHCI.h12
-rw-r--r--src/kernel/StorageKit/ATA.h6
-rw-r--r--src/kernel/StorageKit/NVME.h5
-rw-r--r--src/kernel/StorageKit/SCSI.h5
-rw-r--r--src/kernel/StorageKit/StorageKit.h2
5 files changed, 13 insertions, 17 deletions
diff --git a/src/kernel/StorageKit/AHCI.h b/src/kernel/StorageKit/AHCI.h
index 82bd9747..d29cb0fc 100644
--- a/src/kernel/StorageKit/AHCI.h
+++ b/src/kernel/StorageKit/AHCI.h
@@ -13,11 +13,11 @@
namespace Kernel {
/// @brief AHCIDeviceInterface class
/// @details This class is used to send and receive data from the AHCI device.
-/// @note The class is derived from the DeviceInterface class.
+/// @note The class is derived from the IDevice class.
class AHCIDeviceInterface NE_DEVICE<IMountpoint*> {
public:
- explicit AHCIDeviceInterface(void (*out)(DeviceInterface* self, IMountpoint* out),
- void (*in)(DeviceInterface* self, IMountpoint* in));
+ explicit AHCIDeviceInterface(void (*out)(IDevice* self, IMountpoint* out),
+ void (*in)(IDevice* self, IMountpoint* in));
virtual ~AHCIDeviceInterface() override;
@@ -28,12 +28,10 @@ class AHCIDeviceInterface NE_DEVICE<IMountpoint*> {
const Char* Name() const override;
const UInt16& GetPortsImplemented();
-
- Void SetPortsImplemented(const UInt16& pi);
+ Void SetPortsImplemented(const UInt16& pi);
const UInt32& GetIndex();
-
- Void SetIndex(const UInt32& drv);
+ Void SetIndex(const UInt32& drv);
public:
AHCIDeviceInterface& operator<<(IMountpoint* Data) override;
diff --git a/src/kernel/StorageKit/ATA.h b/src/kernel/StorageKit/ATA.h
index f92e09d3..729cf4f7 100644
--- a/src/kernel/StorageKit/ATA.h
+++ b/src/kernel/StorageKit/ATA.h
@@ -13,10 +13,10 @@
namespace Kernel {
/// @brief ATA device interface class.
-class ATADeviceInterface : public DeviceInterface<IMountpoint*> {
+class ATADeviceInterface : public IDevice<IMountpoint*> {
public:
- explicit ATADeviceInterface(void (*Out)(DeviceInterface*, IMountpoint* outpacket),
- void (*In)(DeviceInterface*, IMountpoint* inpacket));
+ explicit ATADeviceInterface(void (*Out)(IDevice*, IMountpoint* outpacket),
+ void (*In)(IDevice*, IMountpoint* inpacket));
virtual ~ATADeviceInterface();
diff --git a/src/kernel/StorageKit/NVME.h b/src/kernel/StorageKit/NVME.h
index d1c036ab..3a4ced1e 100644
--- a/src/kernel/StorageKit/NVME.h
+++ b/src/kernel/StorageKit/NVME.h
@@ -12,9 +12,8 @@
namespace Kernel {
class NVMEDeviceInterface final NE_DEVICE<IMountpoint*> {
public:
- explicit NVMEDeviceInterface(Void (*out)(DeviceInterface*, IMountpoint* out_packet),
- Void (*in)(DeviceInterface*, IMountpoint* in_packet),
- Void (*cleanup)(Void));
+ explicit NVMEDeviceInterface(Void (*out)(IDevice*, IMountpoint* out_packet),
+ Void (*in)(IDevice*, IMountpoint* in_packet), Void (*cleanup)(Void));
~NVMEDeviceInterface() override;
diff --git a/src/kernel/StorageKit/SCSI.h b/src/kernel/StorageKit/SCSI.h
index f31d36f0..3354a678 100644
--- a/src/kernel/StorageKit/SCSI.h
+++ b/src/kernel/StorageKit/SCSI.h
@@ -13,9 +13,8 @@
namespace Kernel {
class SCSIDeviceInterface final NE_DEVICE<IMountpoint*> {
public:
- explicit SCSIDeviceInterface(Void (*out)(DeviceInterface*, IMountpoint* out_packet),
- Void (*in)(DeviceInterface*, IMountpoint* in_packet),
- Void (*cleanup)(Void));
+ explicit SCSIDeviceInterface(Void (*out)(IDevice*, IMountpoint* out_packet),
+ Void (*in)(IDevice*, IMountpoint* in_packet), Void (*cleanup)(Void));
~SCSIDeviceInterface() override;
diff --git a/src/kernel/StorageKit/StorageKit.h b/src/kernel/StorageKit/StorageKit.h
index c9633392..d7a1b6e9 100644
--- a/src/kernel/StorageKit/StorageKit.h
+++ b/src/kernel/StorageKit/StorageKit.h
@@ -12,7 +12,7 @@
namespace Kernel {
template <typename T>
-class DeviceInterface;
+class IDevice;
class NVMEDeviceInterface;
class AHCIDeviceInterface;