From 6c16bedd69b7ce8d132888b0f7cf04949163bc0e Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 22 Aug 2021 17:11:08 +0200 Subject: [PATCH] Kernel: Remove unnecessary FutexQueue::did_remove() This was only ever called immediately after FutexQueue::try_remove() to VERIFY() that the state looks exactly like it should after returning from try_remove(). --- Kernel/FutexQueue.cpp | 7 ------- Kernel/FutexQueue.h | 1 - Kernel/Syscalls/futex.cpp | 1 - 3 files changed, 9 deletions(-) diff --git a/Kernel/FutexQueue.cpp b/Kernel/FutexQueue.cpp index fe7368e5d8..2d747ea1de 100644 --- a/Kernel/FutexQueue.cpp +++ b/Kernel/FutexQueue.cpp @@ -166,11 +166,4 @@ bool FutexQueue::try_remove() return true; } -void FutexQueue::did_remove() -{ - SpinlockLocker lock(m_lock); - VERIFY(m_was_removed); - VERIFY(is_empty_and_no_imminent_waits_locked()); -} - } diff --git a/Kernel/FutexQueue.h b/Kernel/FutexQueue.h index 0fe513877a..1e7cba2095 100644 --- a/Kernel/FutexQueue.h +++ b/Kernel/FutexQueue.h @@ -32,7 +32,6 @@ public: } bool queue_imminent_wait(); - void did_remove(); bool try_remove(); bool is_empty_and_no_imminent_waits() diff --git a/Kernel/Syscalls/futex.cpp b/Kernel/Syscalls/futex.cpp index 2669f78784..f51e071cfe 100644 --- a/Kernel/Syscalls/futex.cpp +++ b/Kernel/Syscalls/futex.cpp @@ -79,7 +79,6 @@ KResultOr Process::sys$futex(Userspace auto remove_futex_queue = [&](FlatPtr user_address) { if (auto it = m_futex_queues.find(user_address); it != m_futex_queues.end()) { if (it->value->try_remove()) { - it->value->did_remove(); m_futex_queues.remove(it); } }