summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/thread.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-09-29 16:54:39 +0200
committerGitHub <noreply@github.com>2018-09-29 16:54:39 +0200
commitf7b69d61f2a871e8afcd9819b014e873f6e0b80d (patch)
treeab6fa797e0a0edd41cc84138ac56aaba0c5238fe /src/core/hle/kernel/thread.cpp
parentMerge pull request #1360 from FearlessTobi/port-3979 (diff)
parentmemory: Dehardcode the use of fixed memory range constants (diff)
downloadyuzu-f7b69d61f2a871e8afcd9819b014e873f6e0b80d.tar
yuzu-f7b69d61f2a871e8afcd9819b014e873f6e0b80d.tar.gz
yuzu-f7b69d61f2a871e8afcd9819b014e873f6e0b80d.tar.bz2
yuzu-f7b69d61f2a871e8afcd9819b014e873f6e0b80d.tar.lz
yuzu-f7b69d61f2a871e8afcd9819b014e873f6e0b80d.tar.xz
yuzu-f7b69d61f2a871e8afcd9819b014e873f6e0b80d.tar.zst
yuzu-f7b69d61f2a871e8afcd9819b014e873f6e0b80d.zip
Diffstat (limited to 'src/core/hle/kernel/thread.cpp')
-rw-r--r--src/core/hle/kernel/thread.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp
index 315f65338..064ed908d 100644
--- a/src/core/hle/kernel/thread.cpp
+++ b/src/core/hle/kernel/thread.cpp
@@ -262,8 +262,9 @@ SharedPtr<Thread> SetupMainThread(KernelCore& kernel, VAddr entry_point, u32 pri
SetCurrentPageTable(&owner_process.vm_manager.page_table);
// Initialize new "main" thread
+ const VAddr stack_top = owner_process.vm_manager.GetTLSIORegionEndAddress();
auto thread_res = Thread::Create(kernel, "main", entry_point, priority, 0, THREADPROCESSORID_0,
- Memory::STACK_AREA_VADDR_END, &owner_process);
+ stack_top, &owner_process);
SharedPtr<Thread> thread = std::move(thread_res).Unwrap();