summaryrefslogtreecommitdiffhomepage
path: root/dev/kernel/KernelKit/DeviceMgr.h
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-05-30 10:56:29 +0200
committerAmlal El Mahrouss <amlal@nekernel.org>2025-05-30 10:56:29 +0200
commit0e92d4841f0d1b6a5f2e1b093d9d0b6864dfac93 (patch)
tree80b1bcc96d24a058a485c345b14402fdc6486e2a /dev/kernel/KernelKit/DeviceMgr.h
parent267b82036b457242325d30893280fdd4e74cd27f (diff)
refactor: Refactor IDeviceObject to DeviceInterface and its usages.
refactor: Cleanup UPS (UserProcessScheduler) implementation. Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'dev/kernel/KernelKit/DeviceMgr.h')
-rw-r--r--dev/kernel/KernelKit/DeviceMgr.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/dev/kernel/KernelKit/DeviceMgr.h b/dev/kernel/KernelKit/DeviceMgr.h
index 0a21710d..d82b43dc 100644
--- a/dev/kernel/KernelKit/DeviceMgr.h
+++ b/dev/kernel/KernelKit/DeviceMgr.h
@@ -24,13 +24,13 @@
#define kDeviceMgrRootDirPath "/devices/"
-#define NE_DEVICE : public ::Kernel::IDeviceObject
+#define NE_DEVICE : public ::Kernel::DeviceInterface
// Last Rev: Wed, May 27, 2025 6:22 PM
namespace Kernel {
template <typename T>
-class IDeviceObject;
+class DeviceInterface;
template <typename T>
class IOBuf;
@@ -39,26 +39,26 @@ class IOBuf;
/// @brief Device contract interface, represents an HW device.
/***********************************************************************************/
template <typename T>
-class IDeviceObject {
+class DeviceInterface {
public:
- IDeviceObject() = default;
+ DeviceInterface() = default;
- explicit IDeviceObject(void (*Out)(IDeviceObject<T>*, T), void (*In)(IDeviceObject<T>*, T))
+ explicit DeviceInterface(void (*Out)(DeviceInterface<T>*, T), void (*In)(DeviceInterface<T>*, T))
: fOut(Out), fIn(In) {}
- virtual ~IDeviceObject() = default;
+ virtual ~DeviceInterface() = default;
public:
- IDeviceObject& operator=(const IDeviceObject<T>&) = default;
- IDeviceObject(const IDeviceObject<T>&) = default;
+ DeviceInterface& operator=(const DeviceInterface<T>&) = default;
+ DeviceInterface(const DeviceInterface<T>&) = default;
public:
- virtual IDeviceObject<T>& operator<<(T Data) {
+ virtual DeviceInterface<T>& operator<<(T Data) {
fOut(this, Data);
return *this;
}
- virtual IDeviceObject<T>& operator>>(T Data) {
+ virtual DeviceInterface<T>& operator>>(T Data) {
fIn(this, Data);
return *this;
}
@@ -70,8 +70,8 @@ class IDeviceObject {
Bool operator!() { return !fOut || !fIn; }
protected:
- Void (*fOut)(IDeviceObject<T>*, T Data) = {nullptr};
- Void (*fIn)(IDeviceObject<T>*, T Data) = {nullptr};
+ Void (*fOut)(DeviceInterface<T>*, T Data) = {nullptr};
+ Void (*fIn)(DeviceInterface<T>*, T Data) = {nullptr};
};
///