diff options
author | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2015-08-06 02:39:53 +0200 |
---|---|---|
committer | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2015-08-16 06:03:48 +0200 |
commit | 14eca982f4da2bfd4d2c105bc33722e88e59da5f (patch) | |
tree | d812de676c6e2d056ac43abec89251aa36162165 /src/core/hle/kernel/thread.cpp | |
parent | Kernel: Add more infrastructure to support different memory layouts (diff) | |
download | yuzu-14eca982f4da2bfd4d2c105bc33722e88e59da5f.tar yuzu-14eca982f4da2bfd4d2c105bc33722e88e59da5f.tar.gz yuzu-14eca982f4da2bfd4d2c105bc33722e88e59da5f.tar.bz2 yuzu-14eca982f4da2bfd4d2c105bc33722e88e59da5f.tar.lz yuzu-14eca982f4da2bfd4d2c105bc33722e88e59da5f.tar.xz yuzu-14eca982f4da2bfd4d2c105bc33722e88e59da5f.tar.zst yuzu-14eca982f4da2bfd4d2c105bc33722e88e59da5f.zip |
Diffstat (limited to 'src/core/hle/kernel/thread.cpp')
-rw-r--r-- | src/core/hle/kernel/thread.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp index 29ea6d531..c10126513 100644 --- a/src/core/hle/kernel/thread.cpp +++ b/src/core/hle/kernel/thread.cpp @@ -117,6 +117,7 @@ void Thread::Stop() { wait_objects.clear(); Kernel::g_current_process->used_tls_slots[tls_index] = false; + g_current_process->misc_memory_used -= Memory::TLS_ENTRY_SIZE; HLE::Reschedule(__func__); } @@ -414,6 +415,7 @@ ResultVal<SharedPtr<Thread>> Thread::Create(std::string name, VAddr entry_point, } ASSERT_MSG(thread->tls_index != -1, "Out of TLS space"); + g_current_process->misc_memory_used += Memory::TLS_ENTRY_SIZE; // TODO(peachum): move to ScheduleThread() when scheduler is added so selected core is used // to initialize the context @@ -504,7 +506,7 @@ void Thread::SetWaitSynchronizationOutput(s32 output) { } VAddr Thread::GetTLSAddress() const { - return Memory::TLS_AREA_VADDR + tls_index * 0x200; + return Memory::TLS_AREA_VADDR + tls_index * Memory::TLS_ENTRY_SIZE; } //////////////////////////////////////////////////////////////////////////////////////////////////// |