diff options
author | bunnei <bunneidev@gmail.com> | 2018-02-18 20:46:11 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2018-02-18 20:46:11 +0100 |
commit | cec0d4f1918c640524fa0087549da2fab0960e24 (patch) | |
tree | 3b2c3e28cc798b6cdf081d6ddd6e13554458b72a /src/core/hle/kernel/thread.cpp | |
parent | Merge pull request #198 from N00byKing/clang (diff) | |
download | yuzu-cec0d4f1918c640524fa0087549da2fab0960e24.tar yuzu-cec0d4f1918c640524fa0087549da2fab0960e24.tar.gz yuzu-cec0d4f1918c640524fa0087549da2fab0960e24.tar.bz2 yuzu-cec0d4f1918c640524fa0087549da2fab0960e24.tar.lz yuzu-cec0d4f1918c640524fa0087549da2fab0960e24.tar.xz yuzu-cec0d4f1918c640524fa0087549da2fab0960e24.tar.zst yuzu-cec0d4f1918c640524fa0087549da2fab0960e24.zip |
Diffstat (limited to 'src/core/hle/kernel/thread.cpp')
-rw-r--r-- | src/core/hle/kernel/thread.cpp | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp index 130b669a0..0fcc65cbf 100644 --- a/src/core/hle/kernel/thread.cpp +++ b/src/core/hle/kernel/thread.cpp @@ -109,40 +109,6 @@ void Thread::Stop() { Kernel::g_current_process->tls_slots[tls_page].reset(tls_slot); } -Thread* ArbitrateHighestPriorityThread(u32 address) { - Thread* highest_priority_thread = nullptr; - u32 priority = THREADPRIO_LOWEST; - - // Iterate through threads, find highest priority thread that is waiting to be arbitrated... - for (auto& thread : thread_list) { - if (!CheckWait_AddressArbiter(thread.get(), address)) - continue; - - if (thread == nullptr) - continue; - - if (thread->current_priority <= priority) { - highest_priority_thread = thread.get(); - priority = thread->current_priority; - } - } - - // If a thread was arbitrated, resume it - if (nullptr != highest_priority_thread) { - highest_priority_thread->ResumeFromWait(); - } - - return highest_priority_thread; -} - -void ArbitrateAllThreads(u32 address) { - // Resume all threads found to be waiting on the address - for (auto& thread : thread_list) { - if (CheckWait_AddressArbiter(thread.get(), address)) - thread->ResumeFromWait(); - } -} - /** * Switches the CPU's active thread context to that of the specified thread * @param new_thread The thread to switch to |