diff options
author | Andreas Kling <kling@serenityos.org> | 2020-05-16 12:40:15 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-05-16 12:40:15 +0200 |
commit | f7a75598bb738ae9f9c8293efe161a5724fbb127 (patch) | |
tree | 76675f3078d4ba55f540ef89f56e18d6140734ad /Kernel | |
parent | 24d58554281e900ddfa3955de693840e4a893a72 (diff) | |
download | serenity-f7a75598bb738ae9f9c8293efe161a5724fbb127.zip |
Kernel: Remove Process::any_thread()
This was a holdover from the old times when each Process had a special
main thread with TID 0. Using it was a total crapshoot since it would
just return whichever thread was first on the process's thread list.
Now that I've removed all uses of it, we don't need it anymore. :^)
Diffstat (limited to 'Kernel')
-rw-r--r-- | Kernel/Process.cpp | 11 | ||||
-rw-r--r-- | Kernel/Process.h | 2 |
2 files changed, 0 insertions, 13 deletions
diff --git a/Kernel/Process.cpp b/Kernel/Process.cpp index e32ed3c116..e910533efb 100644 --- a/Kernel/Process.cpp +++ b/Kernel/Process.cpp @@ -4612,17 +4612,6 @@ int Process::sys$profiling_disable(pid_t pid) return 0; } -Thread& Process::any_thread() -{ - Thread* found_thread = nullptr; - for_each_thread([&](auto& thread) { - found_thread = &thread; - return IterationDecision::Break; - }); - ASSERT(found_thread); - return *found_thread; -} - WaitQueue& Process::futex_queue(i32* userspace_address) { auto& queue = m_futex_queues.ensure((FlatPtr)userspace_address); diff --git a/Kernel/Process.h b/Kernel/Process.h index 29d6f6c17d..353110cadd 100644 --- a/Kernel/Process.h +++ b/Kernel/Process.h @@ -386,8 +386,6 @@ public: u16 thread_count() const { return m_thread_count; } - Thread& any_thread(); - Lock& big_lock() { return m_big_lock; } struct ELFBundle { |