summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/thread.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/kernel/thread.cpp')
-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 @@
20#include "core/hle/kernel/kernel.h" 20#include "core/hle/kernel/kernel.h"
21#include "core/hle/kernel/process.h" 21#include "core/hle/kernel/process.h"
22#include "core/hle/kernel/thread.h" 22#include "core/hle/kernel/thread.h"
23#include "core/hle/kernel/memory.h"
23#include "core/hle/kernel/mutex.h" 24#include "core/hle/kernel/mutex.h"
24#include "core/hle/result.h" 25#include "core/hle/result.h"
25#include "core/memory.h" 26#include "core/memory.h"
@@ -118,6 +119,7 @@ void Thread::Stop() {
118 119
119 Kernel::g_current_process->used_tls_slots[tls_index] = false; 120 Kernel::g_current_process->used_tls_slots[tls_index] = false;
120 g_current_process->misc_memory_used -= Memory::TLS_ENTRY_SIZE; 121 g_current_process->misc_memory_used -= Memory::TLS_ENTRY_SIZE;
122 g_current_process->memory_region->used -= Memory::TLS_ENTRY_SIZE;
121 123
122 HLE::Reschedule(__func__); 124 HLE::Reschedule(__func__);
123} 125}
@@ -416,6 +418,7 @@ ResultVal<SharedPtr<Thread>> Thread::Create(std::string name, VAddr entry_point,
416 418
417 ASSERT_MSG(thread->tls_index != -1, "Out of TLS space"); 419 ASSERT_MSG(thread->tls_index != -1, "Out of TLS space");
418 g_current_process->misc_memory_used += Memory::TLS_ENTRY_SIZE; 420 g_current_process->misc_memory_used += Memory::TLS_ENTRY_SIZE;
421 g_current_process->memory_region->used += Memory::TLS_ENTRY_SIZE;
419 422
420 // TODO(peachum): move to ScheduleThread() when scheduler is added so selected core is used 423 // TODO(peachum): move to ScheduleThread() when scheduler is added so selected core is used
421 // to initialize the context 424 // to initialize the context