summaryrefslogtreecommitdiff
path: root/Kernel/Devices
diff options
context:
space:
mode:
authorLiav A <liavalb@gmail.com>2020-03-05 19:13:55 +0200
committerAndreas Kling <kling@serenityos.org>2020-03-06 11:19:51 +0100
commit773afefe7c44d8ebf75f9e3909c950214a3540f7 (patch)
treed304e12bbd03637969419af212ad67c798e38610 /Kernel/Devices
parent52954ccce6a44931d7454846d8730468dfdcb46a (diff)
downloadserenity-773afefe7c44d8ebf75f9e3909c950214a3540f7.zip
Kernel: Change HandlerPurpose to HandlerType
Also, GenericInterruptHandler class requires to implement two new methods.
Diffstat (limited to 'Kernel/Devices')
-rw-r--r--Kernel/Devices/FloppyDiskDevice.h2
-rw-r--r--Kernel/Devices/HardwareTimer.h1
-rw-r--r--Kernel/Devices/KeyboardDevice.h2
-rw-r--r--Kernel/Devices/PATAChannel.h2
-rw-r--r--Kernel/Devices/PIT.h2
-rw-r--r--Kernel/Devices/PS2MouseDevice.h2
-rw-r--r--Kernel/Devices/SB16.h2
7 files changed, 12 insertions, 1 deletions
diff --git a/Kernel/Devices/FloppyDiskDevice.h b/Kernel/Devices/FloppyDiskDevice.h
index 607b9d474e..6471a6f66c 100644
--- a/Kernel/Devices/FloppyDiskDevice.h
+++ b/Kernel/Devices/FloppyDiskDevice.h
@@ -172,6 +172,8 @@ public:
virtual ssize_t write(FileDescription&, const u8*, ssize_t) override { return 0; }
virtual bool can_write(const FileDescription&) const override { return true; }
+ virtual const char* purpose() const override { return "Floppy Disk Controller"; }
+
protected:
explicit FloppyDiskDevice(DriveType);
diff --git a/Kernel/Devices/HardwareTimer.h b/Kernel/Devices/HardwareTimer.h
index 1e6429f767..5dbb968c7b 100644
--- a/Kernel/Devices/HardwareTimer.h
+++ b/Kernel/Devices/HardwareTimer.h
@@ -32,7 +32,6 @@ namespace Kernel {
class HardwareTimer : public IRQHandler {
public:
u32 seconds_since_boot();
-
protected:
HardwareTimer(u8 irq_number);
u32 m_seconds_since_boot { 0 };
diff --git a/Kernel/Devices/KeyboardDevice.h b/Kernel/Devices/KeyboardDevice.h
index 8ea872ac0a..1387d95928 100644
--- a/Kernel/Devices/KeyboardDevice.h
+++ b/Kernel/Devices/KeyboardDevice.h
@@ -57,6 +57,8 @@ public:
virtual ssize_t write(FileDescription&, const u8* buffer, ssize_t) override;
virtual bool can_write(const FileDescription&) const override { return true; }
+ virtual const char* purpose() const override { return class_name(); }
+
private:
// ^IRQHandler
virtual void handle_irq(RegisterState&) override;
diff --git a/Kernel/Devices/PATAChannel.h b/Kernel/Devices/PATAChannel.h
index 091e96b9e9..b7aabb808b 100644
--- a/Kernel/Devices/PATAChannel.h
+++ b/Kernel/Devices/PATAChannel.h
@@ -72,6 +72,8 @@ public:
RefPtr<PATADiskDevice> master_device() { return m_master; };
RefPtr<PATADiskDevice> slave_device() { return m_slave; };
+ virtual const char* purpose() const override { return "PATA Channel"; }
+
private:
//^ IRQHandler
virtual void handle_irq(RegisterState&) override;
diff --git a/Kernel/Devices/PIT.h b/Kernel/Devices/PIT.h
index bcb0d7a3f8..b60c39760d 100644
--- a/Kernel/Devices/PIT.h
+++ b/Kernel/Devices/PIT.h
@@ -58,6 +58,8 @@ public:
static PIT& the();
u32 ticks_this_second() const;
+ virtual const char* purpose() const override { return "System Timer"; }
+
private:
PIT();
// ^IRQHandler
diff --git a/Kernel/Devices/PS2MouseDevice.h b/Kernel/Devices/PS2MouseDevice.h
index 39fa48a5fe..60d1700e15 100644
--- a/Kernel/Devices/PS2MouseDevice.h
+++ b/Kernel/Devices/PS2MouseDevice.h
@@ -47,6 +47,8 @@ public:
virtual ssize_t write(FileDescription&, const u8*, ssize_t) override;
virtual bool can_write(const FileDescription&) const override { return true; }
+ virtual const char* purpose() const override { return class_name(); }
+
private:
// ^IRQHandler
void handle_vmmouse_absolute_pointer();
diff --git a/Kernel/Devices/SB16.h b/Kernel/Devices/SB16.h
index 71dd25c0c8..d438acc052 100644
--- a/Kernel/Devices/SB16.h
+++ b/Kernel/Devices/SB16.h
@@ -50,6 +50,8 @@ public:
virtual ssize_t write(FileDescription&, const u8*, ssize_t) override;
virtual bool can_write(const FileDescription&) const override { return true; }
+ virtual const char* purpose() const override { return class_name(); }
+
private:
// ^IRQHandler
virtual void handle_irq(RegisterState&) override;