Переглянути джерело

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().
Andreas Kling 3 роки тому
батько
коміт
6c16bedd69
3 змінених файлів з 0 додано та 9 видалено
  1. 0 7
      Kernel/FutexQueue.cpp
  2. 0 1
      Kernel/FutexQueue.h
  3. 0 1
      Kernel/Syscalls/futex.cpp

+ 0 - 7
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());
-}
-
 }

+ 0 - 1
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()

+ 0 - 1
Kernel/Syscalls/futex.cpp

@@ -79,7 +79,6 @@ KResultOr<FlatPtr> Process::sys$futex(Userspace<const Syscall::SC_futex_params*>
     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);
             }
         }