From 36dee4f0d8ea806b2f061ed66a89e812ab007ed2 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Mon, 22 Dec 2025 07:38:52 +0100 Subject: 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 --- src/kernel/StorageKit/AHCI.h | 12 +++++------- src/kernel/StorageKit/ATA.h | 6 +++--- src/kernel/StorageKit/NVME.h | 5 ++--- src/kernel/StorageKit/SCSI.h | 5 ++--- src/kernel/StorageKit/StorageKit.h | 2 +- 5 files changed, 13 insertions(+), 17 deletions(-) (limited to 'src/kernel/StorageKit') 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 { 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 { 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 { +class ATADeviceInterface : public IDevice { 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 { 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 { 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 -class DeviceInterface; +class IDevice; class NVMEDeviceInterface; class AHCIDeviceInterface; -- cgit v1.2.3