1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:18:11 +00:00

Kernel: Update terminology around Thread's "blocking mutex"

It's more accurate to say that we're blocking on a mutex, rather than
blocking on a lock. The previous terminology made sense when this code
was using something called Kernel::Lock, but since it was renamed to
Kernel::Mutex, this updates brings the language back in sync.
This commit is contained in:
Andreas Kling 2022-01-30 11:43:03 +01:00
parent dca5fe69eb
commit b0e5406ae2
3 changed files with 19 additions and 19 deletions

View file

@ -231,7 +231,7 @@ void Mutex::unblock_waiters(Mode previous_mode)
return false;
m_mode = Mode::Shared;
for (auto& thread : m_blocked_threads_list_shared) {
auto requested_locks = thread.unblock_from_lock(*this);
auto requested_locks = thread.unblock_from_mutex(*this);
m_shared_holders += requested_locks;
#if LOCK_SHARED_UPGRADE_DEBUG
auto set_result = m_shared_holders_map.set(&thread, requested_locks);
@ -244,7 +244,7 @@ void Mutex::unblock_waiters(Mode previous_mode)
auto unblock_exclusive = [&]() {
if (auto* next_exclusive_thread = m_blocked_threads_list_exclusive.first()) {
m_mode = Mode::Exclusive;
m_times_locked = next_exclusive_thread->unblock_from_lock(*this);
m_times_locked = next_exclusive_thread->unblock_from_mutex(*this);
m_holder = next_exclusive_thread;
return true;
}