summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/thread.cpp
diff options
context:
space:
mode:
authorGravatar bunnei2018-02-18 14:46:11 -0500
committerGravatar bunnei2018-02-18 14:46:11 -0500
commitcec0d4f1918c640524fa0087549da2fab0960e24 (patch)
tree3b2c3e28cc798b6cdf081d6ddd6e13554458b72a /src/core/hle/kernel/thread.cpp
parentMerge pull request #198 from N00byKing/clang (diff)
downloadyuzu-cec0d4f1918c640524fa0087549da2fab0960e24.tar.gz
yuzu-cec0d4f1918c640524fa0087549da2fab0960e24.tar.xz
yuzu-cec0d4f1918c640524fa0087549da2fab0960e24.zip
kernel: Remove unused address_arbiter code.
Diffstat (limited to 'src/core/hle/kernel/thread.cpp')
-rw-r--r--src/core/hle/kernel/thread.cpp34
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
112Thread* 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
138void 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