summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/process.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/kernel/process.cpp')
-rw-r--r--src/core/hle/kernel/process.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/hle/kernel/process.cpp b/src/core/hle/kernel/process.cpp
index 90d579b5c..73ee1eb0f 100644
--- a/src/core/hle/kernel/process.cpp
+++ b/src/core/hle/kernel/process.cpp
@@ -187,6 +187,8 @@ ResultCode Process::LoadFromMetadata(const FileSys::ProgramMetadata& metadata) {
187 187
188void Process::Run(s32 main_thread_priority, u64 stack_size) { 188void Process::Run(s32 main_thread_priority, u64 stack_size) {
189 AllocateMainThreadStack(stack_size); 189 AllocateMainThreadStack(stack_size);
190 tls_region_address = CreateTLSRegion();
191
190 vm_manager.LogLayout(); 192 vm_manager.LogLayout();
191 193
192 ChangeStatus(ProcessStatus::Running); 194 ChangeStatus(ProcessStatus::Running);
@@ -218,6 +220,9 @@ void Process::PrepareForTermination() {
218 stop_threads(system.Scheduler(2).GetThreadList()); 220 stop_threads(system.Scheduler(2).GetThreadList());
219 stop_threads(system.Scheduler(3).GetThreadList()); 221 stop_threads(system.Scheduler(3).GetThreadList());
220 222
223 FreeTLSRegion(tls_region_address);
224 tls_region_address = 0;
225
221 ChangeStatus(ProcessStatus::Exited); 226 ChangeStatus(ProcessStatus::Exited);
222} 227}
223 228