diff options
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() { | |||
| 109 | Kernel::g_current_process->tls_slots[tls_page].reset(tls_slot); | 109 | Kernel::g_current_process->tls_slots[tls_page].reset(tls_slot); |
| 110 | } | 110 | } |
| 111 | 111 | ||
| 112 | Thread* ArbitrateHighestPriorityThread(u32 address) { | ||
| 113 | Thread* highest_priority_thread = nullptr; | ||
| 114 | u32 priority = THREADPRIO_LOWEST; | ||
| 115 | |||
| 116 | // Iterate through threads, find highest priority thread that is waiting to be arbitrated... | ||
| 117 | for (auto& thread : thread_list) { | ||
| 118 | if (!CheckWait_AddressArbiter(thread.get(), address)) | ||
| 119 | continue; | ||
| 120 | |||
| 121 | if (thread == nullptr) | ||
| 122 | continue; | ||
| 123 | |||
| 124 | if (thread->current_priority <= priority) { | ||
| 125 | highest_priority_thread = thread.get(); | ||
| 126 | priority = thread->current_priority; | ||
| 127 | } | ||
| 128 | } | ||
| 129 | |||
| 130 | // If a thread was arbitrated, resume it | ||
| 131 | if (nullptr != highest_priority_thread) { | ||
| 132 | highest_priority_thread->ResumeFromWait(); | ||
| 133 | } | ||
| 134 | |||
| 135 | return highest_priority_thread; | ||
| 136 | } | ||
| 137 | |||
| 138 | void ArbitrateAllThreads(u32 address) { | ||
| 139 | // Resume all threads found to be waiting on the address | ||
| 140 | for (auto& thread : thread_list) { | ||
| 141 | if (CheckWait_AddressArbiter(thread.get(), address)) | ||
| 142 | thread->ResumeFromWait(); | ||
| 143 | } | ||
| 144 | } | ||
| 145 | |||
| 146 | /** | 112 | /** |
| 147 | * Switches the CPU's active thread context to that of the specified thread | 113 | * Switches the CPU's active thread context to that of the specified thread |
| 148 | * @param new_thread The thread to switch to | 114 | * @param new_thread The thread to switch to |