summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar bunnei2017-09-20 23:14:06 -0400
committerGravatar bunnei2017-09-30 14:28:54 -0400
commitc5ce5c06e471d556254c1cf465b1d92d6a8f695d (patch)
treed2a08cba5800b41032ff309ce0cddef4cd6680ba
parentcore: Various changes to support 64-bit addressing. (diff)
downloadyuzu-c5ce5c06e471d556254c1cf465b1d92d6a8f695d.tar.gz
yuzu-c5ce5c06e471d556254c1cf465b1d92d6a8f695d.tar.xz
yuzu-c5ce5c06e471d556254c1cf465b1d92d6a8f695d.zip
kernel: Various threading fixes to support 64-bit addressing.
-rw-r--r--src/core/hle/kernel/thread.cpp6
-rw-r--r--src/core/hle/kernel/thread.h10
2 files changed, 8 insertions, 8 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp
index f5f2eb2f7..736be50db 100644
--- a/src/core/hle/kernel/thread.cpp
+++ b/src/core/hle/kernel/thread.cpp
@@ -341,8 +341,8 @@ std::tuple<u32, u32, bool> GetFreeThreadLocalSlot(std::vector<std::bitset<8>>& t
341 * @param entry_point Address of entry point for execution 341 * @param entry_point Address of entry point for execution
342 * @param arg User argument for thread 342 * @param arg User argument for thread
343 */ 343 */
344static void ResetThreadContext(ARM_Interface::ThreadContext& context, u32 stack_top, 344static void ResetThreadContext(ARM_Interface::ThreadContext& context, VAddr stack_top,
345 u32 entry_point, u32 arg) { 345 VAddr entry_point, u64 arg) {
346 memset(&context, 0, sizeof(ARM_Interface::ThreadContext)); 346 memset(&context, 0, sizeof(ARM_Interface::ThreadContext));
347 347
348 context.cpu_registers[0] = arg; 348 context.cpu_registers[0] = arg;
@@ -477,7 +477,7 @@ void Thread::BoostPriority(s32 priority) {
477 current_priority = priority; 477 current_priority = priority;
478} 478}
479 479
480SharedPtr<Thread> SetupMainThread(u32 entry_point, s32 priority) { 480SharedPtr<Thread> SetupMainThread(VAddr entry_point, s32 priority) {
481 DEBUG_ASSERT(!GetCurrentThread()); 481 DEBUG_ASSERT(!GetCurrentThread());
482 482
483 // Initialize new "main" thread 483 // Initialize new "main" thread
diff --git a/src/core/hle/kernel/thread.h b/src/core/hle/kernel/thread.h
index 6a3566f15..2cadb91db 100644
--- a/src/core/hle/kernel/thread.h
+++ b/src/core/hle/kernel/thread.h
@@ -171,8 +171,8 @@ public:
171 u32 thread_id; 171 u32 thread_id;
172 172
173 u32 status; 173 u32 status;
174 u32 entry_point; 174 VAddr entry_point;
175 u32 stack_top; 175 VAddr stack_top;
176 176
177 s32 nominal_priority; ///< Nominal thread priority, as set by the emulated application 177 s32 nominal_priority; ///< Nominal thread priority, as set by the emulated application
178 s32 current_priority; ///< Current thread priority, can be temporarily changed 178 s32 current_priority; ///< Current thread priority, can be temporarily changed
@@ -216,7 +216,7 @@ private:
216 * @param priority The priority to give the main thread 216 * @param priority The priority to give the main thread
217 * @return A shared pointer to the main thread 217 * @return A shared pointer to the main thread
218 */ 218 */
219SharedPtr<Thread> SetupMainThread(u32 entry_point, s32 priority); 219SharedPtr<Thread> SetupMainThread(VAddr entry_point, s32 priority);
220 220
221/** 221/**
222 * Returns whether there are any threads that are ready to run. 222 * Returns whether there are any threads that are ready to run.
@@ -232,13 +232,13 @@ void Reschedule();
232 * Arbitrate the highest priority thread that is waiting 232 * Arbitrate the highest priority thread that is waiting
233 * @param address The address for which waiting threads should be arbitrated 233 * @param address The address for which waiting threads should be arbitrated
234 */ 234 */
235Thread* ArbitrateHighestPriorityThread(u32 address); 235Thread* ArbitrateHighestPriorityThread(VAddr address);
236 236
237/** 237/**
238 * Arbitrate all threads currently waiting. 238 * Arbitrate all threads currently waiting.
239 * @param address The address for which waiting threads should be arbitrated 239 * @param address The address for which waiting threads should be arbitrated
240 */ 240 */
241void ArbitrateAllThreads(u32 address); 241void ArbitrateAllThreads(VAddr address);
242 242
243/** 243/**
244 * Gets the current thread 244 * Gets the current thread