summaryrefslogtreecommitdiff
path: root/Kernel
diff options
context:
space:
mode:
Diffstat (limited to 'Kernel')
-rw-r--r--Kernel/Locking/Mutex.cpp4
-rw-r--r--Kernel/Locking/Mutex.h10
-rw-r--r--Kernel/Thread.h2
3 files changed, 8 insertions, 8 deletions
diff --git a/Kernel/Locking/Mutex.cpp b/Kernel/Locking/Mutex.cpp
index 82cbc45725..ad2a302919 100644
--- a/Kernel/Locking/Mutex.cpp
+++ b/Kernel/Locking/Mutex.cpp
@@ -13,7 +13,7 @@
namespace Kernel {
-void Mutex::lock(Mode mode, [[maybe_unused]] const LockLocation& location)
+void Mutex::lock(Mode mode, [[maybe_unused]] LockLocation const& location)
{
// NOTE: This may be called from an interrupt handler (not an IRQ handler)
// and also from within critical sections!
@@ -312,7 +312,7 @@ auto Mutex::force_unlock_if_locked(u32& lock_count_to_restore) -> Mode
return current_mode;
}
-void Mutex::restore_lock(Mode mode, u32 lock_count, [[maybe_unused]] const LockLocation& location)
+void Mutex::restore_lock(Mode mode, u32 lock_count, [[maybe_unused]] LockLocation const& location)
{
VERIFY(mode != Mode::Unlocked);
VERIFY(lock_count > 0);
diff --git a/Kernel/Locking/Mutex.h b/Kernel/Locking/Mutex.h
index 802d7eff44..f29663ecb6 100644
--- a/Kernel/Locking/Mutex.h
+++ b/Kernel/Locking/Mutex.h
@@ -32,8 +32,8 @@ public:
}
~Mutex() = default;
- void lock(Mode mode = Mode::Exclusive, const LockLocation& location = LockLocation::current());
- void restore_lock(Mode, u32, const LockLocation& location = LockLocation::current());
+ void lock(Mode mode = Mode::Exclusive, LockLocation const& location = LockLocation::current());
+ void restore_lock(Mode, u32, LockLocation const& location = LockLocation::current());
void unlock();
[[nodiscard]] Mode force_unlock_if_locked(u32&);
@@ -111,7 +111,7 @@ public:
{
}
- ALWAYS_INLINE explicit MutexLocker(Mutex& l, Mutex::Mode mode = Mutex::Mode::Exclusive, const LockLocation& location = LockLocation::current())
+ ALWAYS_INLINE explicit MutexLocker(Mutex& l, Mutex::Mode mode = Mutex::Mode::Exclusive, LockLocation const& location = LockLocation::current())
: m_lock(&l)
{
m_lock->lock(mode, location);
@@ -131,7 +131,7 @@ public:
m_lock->unlock();
}
- ALWAYS_INLINE void attach_and_lock(Mutex& lock, Mutex::Mode mode = Mutex::Mode::Exclusive, const LockLocation& location = LockLocation::current())
+ ALWAYS_INLINE void attach_and_lock(Mutex& lock, Mutex::Mode mode = Mutex::Mode::Exclusive, LockLocation const& location = LockLocation::current())
{
VERIFY(!m_locked);
m_lock = &lock;
@@ -140,7 +140,7 @@ public:
m_lock->lock(mode, location);
}
- ALWAYS_INLINE void lock(Mutex::Mode mode = Mutex::Mode::Exclusive, const LockLocation& location = LockLocation::current())
+ ALWAYS_INLINE void lock(Mutex::Mode mode = Mutex::Mode::Exclusive, LockLocation const& location = LockLocation::current())
{
VERIFY(m_lock);
VERIFY(!m_locked);
diff --git a/Kernel/Thread.h b/Kernel/Thread.h
index 3609ecbc8f..4d8989deb3 100644
--- a/Kernel/Thread.h
+++ b/Kernel/Thread.h
@@ -1150,7 +1150,7 @@ public:
RecursiveSpinLock& get_lock() const { return m_lock; }
#if LOCK_DEBUG
- void holding_lock(Mutex& lock, int refs_delta, const LockLocation& location)
+ void holding_lock(Mutex& lock, int refs_delta, LockLocation const& location)
{
VERIFY(refs_delta != 0);
m_holding_locks.fetch_add(refs_delta, AK::MemoryOrder::memory_order_relaxed);