diff options
Diffstat (limited to 'Kernel/Devices')
-rw-r--r-- | Kernel/Devices/AsyncDeviceRequest.cpp | 10 | ||||
-rw-r--r-- | Kernel/Devices/AsyncDeviceRequest.h | 4 | ||||
-rw-r--r-- | Kernel/Devices/Device.cpp | 2 | ||||
-rw-r--r-- | Kernel/Devices/Device.h | 4 | ||||
-rw-r--r-- | Kernel/Devices/HID/HIDManagement.h | 2 | ||||
-rw-r--r-- | Kernel/Devices/HID/I8042Controller.cpp | 6 | ||||
-rw-r--r-- | Kernel/Devices/HID/I8042Controller.h | 16 | ||||
-rw-r--r-- | Kernel/Devices/HID/KeyboardDevice.cpp | 4 | ||||
-rw-r--r-- | Kernel/Devices/HID/KeyboardDevice.h | 2 | ||||
-rw-r--r-- | Kernel/Devices/HID/MouseDevice.cpp | 4 | ||||
-rw-r--r-- | Kernel/Devices/HID/MouseDevice.h | 2 | ||||
-rw-r--r-- | Kernel/Devices/HID/PS2MouseDevice.cpp | 2 | ||||
-rw-r--r-- | Kernel/Devices/HID/VMWareMouseDevice.cpp | 2 | ||||
-rw-r--r-- | Kernel/Devices/KCOVDevice.cpp | 2 | ||||
-rw-r--r-- | Kernel/Devices/KCOVInstance.h | 4 | ||||
-rw-r--r-- | Kernel/Devices/SerialDevice.cpp | 4 | ||||
-rw-r--r-- | Kernel/Devices/SerialDevice.h | 2 |
17 files changed, 36 insertions, 36 deletions
diff --git a/Kernel/Devices/AsyncDeviceRequest.cpp b/Kernel/Devices/AsyncDeviceRequest.cpp index a18a93bebd..2d8d5f41da 100644 --- a/Kernel/Devices/AsyncDeviceRequest.cpp +++ b/Kernel/Devices/AsyncDeviceRequest.cpp @@ -18,7 +18,7 @@ AsyncDeviceRequest::AsyncDeviceRequest(Device& device) AsyncDeviceRequest::~AsyncDeviceRequest() { { - ScopedSpinLock lock(m_lock); + ScopedSpinlock lock(m_lock); VERIFY(is_completed_result(m_result)); VERIFY(m_sub_requests_pending.is_empty()); } @@ -63,7 +63,7 @@ auto AsyncDeviceRequest::wait(Time* timeout) -> RequestWaitResult auto AsyncDeviceRequest::get_request_result() const -> RequestResult { - ScopedSpinLock lock(m_lock); + ScopedSpinlock lock(m_lock); return m_result; } @@ -74,7 +74,7 @@ void AsyncDeviceRequest::add_sub_request(NonnullRefPtr<AsyncDeviceRequest> sub_r VERIFY(sub_request->m_parent_request == nullptr); sub_request->m_parent_request = this; - ScopedSpinLock lock(m_lock); + ScopedSpinlock lock(m_lock); VERIFY(!is_completed_result(m_result)); m_sub_requests_pending.append(sub_request); if (m_result == Started) @@ -85,7 +85,7 @@ void AsyncDeviceRequest::sub_request_finished(AsyncDeviceRequest& sub_request) { bool all_completed; { - ScopedSpinLock lock(m_lock); + ScopedSpinlock lock(m_lock); VERIFY(m_result == Started); if (m_sub_requests_pending.contains(sub_request)) { @@ -131,7 +131,7 @@ void AsyncDeviceRequest::complete(RequestResult result) VERIFY(result == Success || result == Failure || result == MemoryFault); ScopedCritical critical; { - ScopedSpinLock lock(m_lock); + ScopedSpinlock lock(m_lock); VERIFY(m_result == Started); m_result = result; } diff --git a/Kernel/Devices/AsyncDeviceRequest.h b/Kernel/Devices/AsyncDeviceRequest.h index 48ca3a5b26..86ad7318d9 100644 --- a/Kernel/Devices/AsyncDeviceRequest.h +++ b/Kernel/Devices/AsyncDeviceRequest.h @@ -61,7 +61,7 @@ public: [[nodiscard]] RequestWaitResult wait(Time* = nullptr); - void do_start(ScopedSpinLock<SpinLock<u8>>&& requests_lock) + void do_start(ScopedSpinlock<Spinlock<u8>>&& requests_lock) { if (is_completed_result(m_result)) return; @@ -150,7 +150,7 @@ private: WaitQueue m_queue; NonnullRefPtr<Process> m_process; void* m_private { nullptr }; - mutable SpinLock<u8> m_lock; + mutable Spinlock<u8> m_lock; }; } diff --git a/Kernel/Devices/Device.cpp b/Kernel/Devices/Device.cpp index 55136ea5d5..2689dfeec8 100644 --- a/Kernel/Devices/Device.cpp +++ b/Kernel/Devices/Device.cpp @@ -62,7 +62,7 @@ String Device::absolute_path(const FileDescription&) const void Device::process_next_queued_request(Badge<AsyncDeviceRequest>, const AsyncDeviceRequest& completed_request) { - ScopedSpinLock lock(m_requests_lock); + ScopedSpinlock lock(m_requests_lock); VERIFY(!m_requests.is_empty()); VERIFY(m_requests.first().ptr() == &completed_request); m_requests.remove(m_requests.begin()); diff --git a/Kernel/Devices/Device.h b/Kernel/Devices/Device.h index 108d67280d..1c12e03813 100644 --- a/Kernel/Devices/Device.h +++ b/Kernel/Devices/Device.h @@ -52,7 +52,7 @@ public: NonnullRefPtr<AsyncRequestType> make_request(Args&&... args) { auto request = adopt_ref(*new AsyncRequestType(*this, forward<Args>(args)...)); - ScopedSpinLock lock(m_requests_lock); + ScopedSpinlock lock(m_requests_lock); bool was_empty = m_requests.is_empty(); m_requests.append(request); if (was_empty) @@ -73,7 +73,7 @@ private: uid_t m_uid { 0 }; gid_t m_gid { 0 }; - SpinLock<u8> m_requests_lock; + Spinlock<u8> m_requests_lock; DoublyLinkedList<RefPtr<AsyncDeviceRequest>> m_requests; }; 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 <Kernel/API/KeyCode.h> #include <Kernel/API/MousePacket.h> #include <Kernel/KResult.h> -#include <Kernel/Locking/SpinLock.h> +#include <Kernel/Locking/Spinlock.h> #include <Kernel/UnixTypes.h> #include <LibKeyboard/CharacterMap.h> 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 <AK/RefCounted.h> #include <Kernel/Devices/HID/KeyboardDevice.h> #include <Kernel/Devices/HID/MouseDevice.h> -#include <Kernel/Locking/SpinLock.h> +#include <Kernel/Locking/Spinlock.h> 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<u8> m_lock; + Spinlock<u8> 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<size_t> 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<u8> m_queue_lock; + mutable Spinlock<u8> m_queue_lock; CircularQueue<Event, 16> 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<size_t> MouseDevice::read(FileDescription&, u64, UserOrKernelBuffer& b VERIFY(size > 0); size_t nread = 0; size_t remaining_space_in_buffer = static_cast<size_t>(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<u8> m_queue_lock; + mutable Spinlock<u8> m_queue_lock; CircularQueue<MousePacket, 100> 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(); diff --git a/Kernel/Devices/KCOVDevice.cpp b/Kernel/Devices/KCOVDevice.cpp index 4a2fc5243d..ec4a54d758 100644 --- a/Kernel/Devices/KCOVDevice.cpp +++ b/Kernel/Devices/KCOVDevice.cpp @@ -84,7 +84,7 @@ KResult KCOVDevice::ioctl(FileDescription&, unsigned request, Userspace<void*> a return ENXIO; // This proc hasn't opened the kcov dev yet auto kcov_instance = maybe_kcov_instance.value(); - ScopedSpinLock lock(kcov_instance->lock); + ScopedSpinlock lock(kcov_instance->lock); switch (request) { case KCOV_SETBUFSIZE: { if (kcov_instance->state >= KCOVInstance::TRACING) { diff --git a/Kernel/Devices/KCOVInstance.h b/Kernel/Devices/KCOVInstance.h index fd0ecb76fd..393c9ad078 100644 --- a/Kernel/Devices/KCOVInstance.h +++ b/Kernel/Devices/KCOVInstance.h @@ -6,7 +6,7 @@ #pragma once -#include <Kernel/Locking/SpinLock.h> +#include <Kernel/Locking/Spinlock.h> #include <Kernel/Memory/AnonymousVMObject.h> namespace Kernel { @@ -35,7 +35,7 @@ public: bool has_buffer() const { return m_buffer != nullptr; } void buffer_add_pc(u64 pc); - SpinLock<u8> lock; + Spinlock<u8> lock; enum { UNUSED = 0, OPENED = 1, diff --git a/Kernel/Devices/SerialDevice.cpp b/Kernel/Devices/SerialDevice.cpp index bc5d0decb7..1384b9f44b 100644 --- a/Kernel/Devices/SerialDevice.cpp +++ b/Kernel/Devices/SerialDevice.cpp @@ -59,7 +59,7 @@ KResultOr<size_t> SerialDevice::read(FileDescription&, u64, UserOrKernelBuffer& if (!size) return 0; - ScopedSpinLock lock(m_serial_lock); + ScopedSpinlock lock(m_serial_lock); if (!(get_line_status() & DataReady)) return 0; @@ -80,7 +80,7 @@ KResultOr<size_t> SerialDevice::write(FileDescription& description, u64, const U if (!size) return 0; - ScopedSpinLock lock(m_serial_lock); + ScopedSpinlock lock(m_serial_lock); if (!can_write(description, size)) return EAGAIN; diff --git a/Kernel/Devices/SerialDevice.h b/Kernel/Devices/SerialDevice.h index 7e0e77c01e..6daf8fea34 100644 --- a/Kernel/Devices/SerialDevice.h +++ b/Kernel/Devices/SerialDevice.h @@ -133,7 +133,7 @@ private: bool m_break_enable { false }; u8 m_modem_control { 0 }; bool m_last_put_char_was_carriage_return { false }; - SpinLock<u8> m_serial_lock; + Spinlock<u8> m_serial_lock; }; } |