diff options
author | Andreas Kling <kling@serenityos.org> | 2021-08-22 01:49:22 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-08-22 03:34:10 +0200 |
commit | c922a7da090d57ed36cf8526e985b82ec3f4933f (patch) | |
tree | d4791565a1149af47eae4cb4470f875e0644f18c /Kernel/Devices/HID/MouseDevice.cpp | |
parent | 55adace359bfda606b445b5177ce5138687d4626 (diff) | |
download | serenity-c922a7da090d57ed36cf8526e985b82ec3f4933f.zip |
Kernel: Rename ScopedSpinlock => SpinlockLocker
This matches MutexLocker, and doesn't sound like it's a lock itself.
Diffstat (limited to 'Kernel/Devices/HID/MouseDevice.cpp')
-rw-r--r-- | Kernel/Devices/HID/MouseDevice.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/Devices/HID/MouseDevice.cpp b/Kernel/Devices/HID/MouseDevice.cpp index 1554335ba6..80c4a1ef73 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); + SpinlockLocker 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); + SpinlockLocker lock(m_queue_lock); while (!m_queue.is_empty() && remaining_space_in_buffer) { auto packet = m_queue.dequeue(); lock.unlock(); |