summaryrefslogtreecommitdiff
path: root/Kernel/Locking/Mutex.h
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-08-29 12:48:43 +0200
committerAndreas Kling <kling@serenityos.org>2021-08-29 12:53:11 +0200
commit0b4671add70850387d2a2b45f6e66568b44ef75b (patch)
tree0e4031b543e4d0b077b3910a4b3292c1e64cbe98 /Kernel/Locking/Mutex.h
parentd9da513959a13663b0a743103c7fc35a4322de12 (diff)
downloadserenity-0b4671add70850387d2a2b45f6e66568b44ef75b.zip
Kernel: {Mutex,Spinlock}::own_lock() => is_locked_by_current_thread()
Rename these API's to make it more clear what they are checking.
Diffstat (limited to 'Kernel/Locking/Mutex.h')
-rw-r--r--Kernel/Locking/Mutex.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/Locking/Mutex.h b/Kernel/Locking/Mutex.h
index f64153f63f..068daa4635 100644
--- a/Kernel/Locking/Mutex.h
+++ b/Kernel/Locking/Mutex.h
@@ -42,7 +42,7 @@ public:
SpinlockLocker lock(m_lock);
return m_mode != Mode::Unlocked;
}
- [[nodiscard]] bool own_lock() const
+ [[nodiscard]] bool is_locked_by_current_thread() const
{
SpinlockLocker lock(m_lock);
if (m_mode == Mode::Exclusive)