From 55adace359bfda606b445b5177ce5138687d4626 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 22 Aug 2021 01:37:17 +0200 Subject: Kernel: Rename SpinLock => Spinlock --- Kernel/Devices/HID/HIDManagement.h | 2 +- Kernel/Devices/HID/I8042Controller.cpp | 6 +++--- Kernel/Devices/HID/I8042Controller.h | 16 ++++++++-------- Kernel/Devices/HID/KeyboardDevice.cpp | 4 ++-- Kernel/Devices/HID/KeyboardDevice.h | 2 +- Kernel/Devices/HID/MouseDevice.cpp | 4 ++-- Kernel/Devices/HID/MouseDevice.h | 2 +- Kernel/Devices/HID/PS2MouseDevice.cpp | 2 +- Kernel/Devices/HID/VMWareMouseDevice.cpp | 2 +- 9 files changed, 20 insertions(+), 20 deletions(-) (limited to 'Kernel/Devices/HID') diff --git a/Kernel/Devices/HID/HIDManagement.h b/Kernel/Devices/HID/HIDManagement.h index 6a50f4db1d..0328ba9fbe 100644 --- a/Kernel/Devices/HID/HIDManagement.h +++ b/Kernel/Devices/HID/HIDManagement.h @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include diff --git a/Kernel/Devices/HID/I8042Controller.cpp b/Kernel/Devices/HID/I8042Controller.cpp index 26d4d1f687..e9ee98a928 100644 --- a/Kernel/Devices/HID/I8042Controller.cpp +++ b/Kernel/Devices/HID/I8042Controller.cpp @@ -35,7 +35,7 @@ UNMAP_AFTER_INIT void I8042Controller::detect_devices() { u8 configuration; { - ScopedSpinLock lock(m_lock); + ScopedSpinlock lock(m_lock); // Disable devices do_wait_then_write(I8042_STATUS, 0xad); do_wait_then_write(I8042_STATUS, 0xa7); // ignored if it doesn't exist @@ -103,7 +103,7 @@ UNMAP_AFTER_INIT void I8042Controller::detect_devices() m_first_port_available = false; configuration &= ~1; configuration |= 1 << 4; - ScopedSpinLock lock(m_lock); + ScopedSpinlock lock(m_lock); do_wait_then_write(I8042_STATUS, 0x60); do_wait_then_write(I8042_BUFFER, configuration); } @@ -116,7 +116,7 @@ UNMAP_AFTER_INIT void I8042Controller::detect_devices() dbgln("I8042: Mouse device failed to initialize, disable"); m_second_port_available = false; configuration |= 1 << 5; - ScopedSpinLock lock(m_lock); + ScopedSpinlock lock(m_lock); do_wait_then_write(I8042_STATUS, 0x60); do_wait_then_write(I8042_BUFFER, configuration); } diff --git a/Kernel/Devices/HID/I8042Controller.h b/Kernel/Devices/HID/I8042Controller.h index 5224cc1e80..e4983278cc 100644 --- a/Kernel/Devices/HID/I8042Controller.h +++ b/Kernel/Devices/HID/I8042Controller.h @@ -9,7 +9,7 @@ #include #include #include -#include +#include namespace Kernel { @@ -53,36 +53,36 @@ public: bool reset_device(HIDDevice::Type device) { - ScopedSpinLock lock(m_lock); + ScopedSpinlock lock(m_lock); return do_reset_device(device); } u8 send_command(HIDDevice::Type device, u8 command) { - ScopedSpinLock lock(m_lock); + ScopedSpinlock lock(m_lock); return do_send_command(device, command); } u8 send_command(HIDDevice::Type device, u8 command, u8 data) { - ScopedSpinLock lock(m_lock); + ScopedSpinlock lock(m_lock); return do_send_command(device, command, data); } u8 read_from_device(HIDDevice::Type device) { - ScopedSpinLock lock(m_lock); + ScopedSpinlock lock(m_lock); return do_read_from_device(device); } void wait_then_write(u8 port, u8 data) { - ScopedSpinLock lock(m_lock); + ScopedSpinlock lock(m_lock); do_wait_then_write(port, data); } u8 wait_then_read(u8 port) { - ScopedSpinLock lock(m_lock); + ScopedSpinlock lock(m_lock); return do_wait_then_read(port); } @@ -105,7 +105,7 @@ private: void do_wait_then_write(u8 port, u8 data); u8 do_wait_then_read(u8 port); - SpinLock m_lock; + Spinlock m_lock; bool m_first_port_available { false }; bool m_second_port_available { false }; bool m_is_dual_channel { false }; diff --git a/Kernel/Devices/HID/KeyboardDevice.cpp b/Kernel/Devices/HID/KeyboardDevice.cpp index 7d490f8595..ad81323c0e 100644 --- a/Kernel/Devices/HID/KeyboardDevice.cpp +++ b/Kernel/Devices/HID/KeyboardDevice.cpp @@ -251,7 +251,7 @@ void KeyboardDevice::key_state_changed(u8 scan_code, bool pressed) HIDManagement::the().m_client->on_key_pressed(event); { - ScopedSpinLock lock(m_queue_lock); + ScopedSpinlock lock(m_queue_lock); m_queue.enqueue(event); } @@ -281,7 +281,7 @@ bool KeyboardDevice::can_read(const FileDescription&, size_t) const KResultOr KeyboardDevice::read(FileDescription&, u64, UserOrKernelBuffer& buffer, size_t size) { size_t nread = 0; - ScopedSpinLock lock(m_queue_lock); + ScopedSpinlock lock(m_queue_lock); while (nread < size) { if (m_queue.is_empty()) break; diff --git a/Kernel/Devices/HID/KeyboardDevice.h b/Kernel/Devices/HID/KeyboardDevice.h index 3269971a20..74197eaf20 100644 --- a/Kernel/Devices/HID/KeyboardDevice.h +++ b/Kernel/Devices/HID/KeyboardDevice.h @@ -51,7 +51,7 @@ public: protected: KeyboardDevice(); - mutable SpinLock m_queue_lock; + mutable Spinlock m_queue_lock; CircularQueue m_queue; // ^CharacterDevice virtual StringView class_name() const override { return "KeyboardDevice"; } diff --git a/Kernel/Devices/HID/MouseDevice.cpp b/Kernel/Devices/HID/MouseDevice.cpp index 3c91d76500..1554335ba6 100644 --- a/Kernel/Devices/HID/MouseDevice.cpp +++ b/Kernel/Devices/HID/MouseDevice.cpp @@ -20,7 +20,7 @@ MouseDevice::~MouseDevice() bool MouseDevice::can_read(const FileDescription&, size_t) const { - ScopedSpinLock lock(m_queue_lock); + ScopedSpinlock lock(m_queue_lock); return !m_queue.is_empty(); } @@ -29,7 +29,7 @@ KResultOr MouseDevice::read(FileDescription&, u64, UserOrKernelBuffer& b VERIFY(size > 0); size_t nread = 0; size_t remaining_space_in_buffer = static_cast(size) - nread; - ScopedSpinLock lock(m_queue_lock); + ScopedSpinlock lock(m_queue_lock); while (!m_queue.is_empty() && remaining_space_in_buffer) { auto packet = m_queue.dequeue(); lock.unlock(); diff --git a/Kernel/Devices/HID/MouseDevice.h b/Kernel/Devices/HID/MouseDevice.h index f6f2e2982d..1c2eaee488 100644 --- a/Kernel/Devices/HID/MouseDevice.h +++ b/Kernel/Devices/HID/MouseDevice.h @@ -41,7 +41,7 @@ protected: // ^CharacterDevice virtual StringView class_name() const override { return "MouseDevice"; } - mutable SpinLock m_queue_lock; + mutable Spinlock m_queue_lock; CircularQueue m_queue; }; diff --git a/Kernel/Devices/HID/PS2MouseDevice.cpp b/Kernel/Devices/HID/PS2MouseDevice.cpp index c10f50cf63..c6453f41c3 100644 --- a/Kernel/Devices/HID/PS2MouseDevice.cpp +++ b/Kernel/Devices/HID/PS2MouseDevice.cpp @@ -60,7 +60,7 @@ void PS2MouseDevice::irq_handle_byte_read(u8 byte) m_entropy_source.add_random_event(m_data.dword); { - ScopedSpinLock lock(m_queue_lock); + ScopedSpinlock lock(m_queue_lock); m_queue.enqueue(parse_data_packet(m_data)); } evaluate_block_conditions(); diff --git a/Kernel/Devices/HID/VMWareMouseDevice.cpp b/Kernel/Devices/HID/VMWareMouseDevice.cpp index 6fb1dd197d..a2dab03e04 100644 --- a/Kernel/Devices/HID/VMWareMouseDevice.cpp +++ b/Kernel/Devices/HID/VMWareMouseDevice.cpp @@ -36,7 +36,7 @@ void VMWareMouseDevice::irq_handle_byte_read(u8) if (mouse_packet.has_value()) { m_entropy_source.add_random_event(mouse_packet.value()); { - ScopedSpinLock lock(m_queue_lock); + ScopedSpinlock lock(m_queue_lock); m_queue.enqueue(mouse_packet.value()); } evaluate_block_conditions(); -- cgit v1.2.3