summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/thread.cpp
diff options
context:
space:
mode:
authorGravatar bunnei2014-05-13 23:18:28 -0400
committerGravatar bunnei2014-05-13 23:18:28 -0400
commit0de78eb3c4407cfedb8779422d96b7ee73fc19ed (patch)
treef73e18968732eeaec4f8833c7f7a1d0954e5f2bb /src/core/hle/kernel/thread.cpp
parentvarious cleanups / remove unused code (diff)
downloadyuzu-0de78eb3c4407cfedb8779422d96b7ee73fc19ed.tar.gz
yuzu-0de78eb3c4407cfedb8779422d96b7ee73fc19ed.tar.xz
yuzu-0de78eb3c4407cfedb8779422d96b7ee73fc19ed.zip
fixed thread reset to not set stack address
Diffstat (limited to 'src/core/hle/kernel/thread.cpp')
-rw-r--r--src/core/hle/kernel/thread.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp
index 95ef2c173..c59d2a689 100644
--- a/src/core/hle/kernel/thread.cpp
+++ b/src/core/hle/kernel/thread.cpp
@@ -417,7 +417,6 @@ void ThreadContext::reset() {
417 for (int i = 0; i < 16; i++) { 417 for (int i = 0; i < 16; i++) {
418 reg[i] = 0; 418 reg[i] = 0;
419 } 419 }
420 reg[13] = Memory::SCRATCHPAD_VADDR_END;
421 cpsr = 0; 420 cpsr = 0;
422} 421}
423 422
@@ -464,6 +463,7 @@ Thread* __KernelCreateThread(UID& id, UID module_id, const char* name, u32 prior
464void __KernelResetThread(Thread *t, int lowest_priority) { 463void __KernelResetThread(Thread *t, int lowest_priority) {
465 t->context.reset(); 464 t->context.reset();
466 t->context.pc = t->nt.entry_point; 465 t->context.pc = t->nt.entry_point;
466 t->context.reg[13] = t->nt.initial_stack;
467 467
468 // If the thread would be better than lowestPriority, reset to its initial. Yes, kinda odd... 468 // If the thread would be better than lowestPriority, reset to its initial. Yes, kinda odd...
469 if (t->nt.current_priority < lowest_priority) { 469 if (t->nt.current_priority < lowest_priority) {