Skip to content

Commit 1ad4a19

Browse files
Hendiadyoin1bgianfo
authored andcommitted
Kernel: Add implied auto-specifiers in Locking
As per clang-tidy.
1 parent a7209ca commit 1ad4a19

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Kernel/Locking/LockRank.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ namespace Kernel {
1515
void track_lock_acquire(LockRank rank)
1616
{
1717
if constexpr (LOCK_RANK_ENFORCEMENT) {
18-
auto thread = Thread::current();
18+
auto* thread = Thread::current();
1919
if (thread && !thread->is_crashing())
2020
thread->track_lock_acquire(rank);
2121
}
@@ -24,7 +24,7 @@ void track_lock_acquire(LockRank rank)
2424
void track_lock_release(LockRank rank)
2525
{
2626
if constexpr (LOCK_RANK_ENFORCEMENT) {
27-
auto thread = Thread::current();
27+
auto* thread = Thread::current();
2828
if (thread && !thread->is_crashing())
2929
thread->track_lock_release(rank);
3030
}

Kernel/Locking/Mutex.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ void Mutex::lock(Mode mode, [[maybe_unused]] LockLocation const& location)
2121
if constexpr (LOCK_IN_CRITICAL_DEBUG)
2222
VERIFY_INTERRUPTS_ENABLED();
2323
VERIFY(mode != Mode::Unlocked);
24-
auto current_thread = Thread::current();
24+
auto* current_thread = Thread::current();
2525

2626
SpinlockLocker lock(m_lock);
2727
bool did_block = false;
@@ -148,7 +148,7 @@ void Mutex::unlock()
148148
if constexpr (LOCK_IN_CRITICAL_DEBUG)
149149
VERIFY_INTERRUPTS_ENABLED();
150150
VERIFY(!Processor::current_in_irq());
151-
auto current_thread = Thread::current();
151+
auto* current_thread = Thread::current();
152152
SpinlockLocker lock(m_lock);
153153
Mode current_mode = m_mode;
154154
if constexpr (LOCK_TRACE_DEBUG) {
@@ -260,7 +260,7 @@ auto Mutex::force_unlock_if_locked(u32& lock_count_to_restore) -> Mode
260260
// NOTE: This may be called from an interrupt handler (not an IRQ handler)
261261
// and also from within critical sections!
262262
VERIFY(!Processor::current_in_irq());
263-
auto current_thread = Thread::current();
263+
auto* current_thread = Thread::current();
264264
SpinlockLocker lock(m_lock);
265265
auto current_mode = m_mode;
266266
switch (current_mode) {
@@ -323,7 +323,7 @@ void Mutex::restore_lock(Mode mode, u32 lock_count, [[maybe_unused]] LockLocatio
323323
VERIFY(mode != Mode::Unlocked);
324324
VERIFY(lock_count > 0);
325325
VERIFY(!Processor::current_in_irq());
326-
auto current_thread = Thread::current();
326+
auto* current_thread = Thread::current();
327327
bool did_block = false;
328328
SpinlockLocker lock(m_lock);
329329
switch (mode) {

0 commit comments

Comments
 (0)