summaryrefslogtreecommitdiff
path: root/Kernel/Locking/Mutex.cpp
diff options
context:
space:
mode:
authorHendiadyoin1 <leon2002.la@gmail.com>2021-12-15 14:56:39 +0100
committerBrian Gianforcaro <b.gianfo@gmail.com>2021-12-15 23:34:11 -0800
commit1ad4a190b5ca9303bd4b1897202f8afca1e3167b (patch)
treeb5b01001c85d1cc7be3d53ed200e376b81f9a508 /Kernel/Locking/Mutex.cpp
parenta7209ca0f962526799ccab90bf19f94415564792 (diff)
downloadserenity-1ad4a190b5ca9303bd4b1897202f8afca1e3167b.zip
Kernel: Add implied auto-specifiers in Locking
As per clang-tidy.
Diffstat (limited to 'Kernel/Locking/Mutex.cpp')
-rw-r--r--Kernel/Locking/Mutex.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Kernel/Locking/Mutex.cpp b/Kernel/Locking/Mutex.cpp
index b4f97ad2c7..663fc81759 100644
--- a/Kernel/Locking/Mutex.cpp
+++ b/Kernel/Locking/Mutex.cpp
@@ -21,7 +21,7 @@ void Mutex::lock(Mode mode, [[maybe_unused]] LockLocation const& location)
if constexpr (LOCK_IN_CRITICAL_DEBUG)
VERIFY_INTERRUPTS_ENABLED();
VERIFY(mode != Mode::Unlocked);
- auto current_thread = Thread::current();
+ auto* current_thread = Thread::current();
SpinlockLocker lock(m_lock);
bool did_block = false;
@@ -148,7 +148,7 @@ void Mutex::unlock()
if constexpr (LOCK_IN_CRITICAL_DEBUG)
VERIFY_INTERRUPTS_ENABLED();
VERIFY(!Processor::current_in_irq());
- auto current_thread = Thread::current();
+ auto* current_thread = Thread::current();
SpinlockLocker lock(m_lock);
Mode current_mode = m_mode;
if constexpr (LOCK_TRACE_DEBUG) {
@@ -260,7 +260,7 @@ auto Mutex::force_unlock_if_locked(u32& lock_count_to_restore) -> Mode
// NOTE: This may be called from an interrupt handler (not an IRQ handler)
// and also from within critical sections!
VERIFY(!Processor::current_in_irq());
- auto current_thread = Thread::current();
+ auto* current_thread = Thread::current();
SpinlockLocker lock(m_lock);
auto current_mode = m_mode;
switch (current_mode) {
@@ -323,7 +323,7 @@ void Mutex::restore_lock(Mode mode, u32 lock_count, [[maybe_unused]] LockLocatio
VERIFY(mode != Mode::Unlocked);
VERIFY(lock_count > 0);
VERIFY(!Processor::current_in_irq());
- auto current_thread = Thread::current();
+ auto* current_thread = Thread::current();
bool did_block = false;
SpinlockLocker lock(m_lock);
switch (mode) {