From 7e9df6ddba15dbd0689bc9a7bacb3108a65994b8 Mon Sep 17 00:00:00 2001 From: Idan Horowitz Date: Wed, 26 Jan 2022 18:34:04 +0200 Subject: [PATCH] Kernel: Remove always-false Thread::drop_thread_count boolean parameter --- Kernel/Thread.cpp | 7 +++---- Kernel/Thread.h | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Kernel/Thread.cpp b/Kernel/Thread.cpp index 11649168ac..e3cd8b580c 100644 --- a/Kernel/Thread.cpp +++ b/Kernel/Thread.cpp @@ -512,14 +512,13 @@ void Thread::finalize() } } - drop_thread_count(false); + drop_thread_count(); } -void Thread::drop_thread_count(bool initializing_first_thread) +void Thread::drop_thread_count() { bool is_last = process().remove_thread(*this); - - if (!initializing_first_thread && is_last) + if (is_last) process().finalize(); } diff --git a/Kernel/Thread.h b/Kernel/Thread.h index a961dbbb64..c0e2400611 100644 --- a/Kernel/Thread.h +++ b/Kernel/Thread.h @@ -1412,7 +1412,7 @@ private: }; void yield_without_releasing_big_lock(VerifyLockNotHeld verify_lock_not_held = VerifyLockNotHeld::Yes); - void drop_thread_count(bool); + void drop_thread_count(); mutable IntrusiveListNode m_global_thread_list_node;