summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/thread.cpp
diff options
context:
space:
mode:
authorYuri Kunde Schlesner <yuriks@yuriks.net>2015-11-27 04:00:16 +0100
committerYuri Kunde Schlesner <yuriks@yuriks.net>2015-12-01 04:49:44 +0100
commit84a22cb5947b0733a043429032367227e73342dc (patch)
tree928497d2056d1c5ea719ac0cb359888b0df4d6bc /src/core/hle/kernel/thread.cpp
parentMerge pull request #1259 from lioncash/zero (diff)
downloadyuzu-84a22cb5947b0733a043429032367227e73342dc.tar
yuzu-84a22cb5947b0733a043429032367227e73342dc.tar.gz
yuzu-84a22cb5947b0733a043429032367227e73342dc.tar.bz2
yuzu-84a22cb5947b0733a043429032367227e73342dc.tar.lz
yuzu-84a22cb5947b0733a043429032367227e73342dc.tar.xz
yuzu-84a22cb5947b0733a043429032367227e73342dc.tar.zst
yuzu-84a22cb5947b0733a043429032367227e73342dc.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/kernel/thread.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp
index 00fa995f6..c08fc1c7a 100644
--- a/src/core/hle/kernel/thread.cpp
+++ b/src/core/hle/kernel/thread.cpp
@@ -20,6 +20,7 @@
#include "core/hle/kernel/kernel.h"
#include "core/hle/kernel/process.h"
#include "core/hle/kernel/thread.h"
+#include "core/hle/kernel/memory.h"
#include "core/hle/kernel/mutex.h"
#include "core/hle/result.h"
#include "core/memory.h"
@@ -118,6 +119,7 @@ void Thread::Stop() {
Kernel::g_current_process->used_tls_slots[tls_index] = false;
g_current_process->misc_memory_used -= Memory::TLS_ENTRY_SIZE;
+ g_current_process->memory_region->used -= Memory::TLS_ENTRY_SIZE;
HLE::Reschedule(__func__);
}
@@ -416,6 +418,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;
+ g_current_process->memory_region->used += Memory::TLS_ENTRY_SIZE;
// TODO(peachum): move to ScheduleThread() when scheduler is added so selected core is used
// to initialize the context