aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/hle/kernel/thread.cpp
diff options
context:
space:
mode:
authorGravatar Subv <subv2112@gmail.com>2015-05-11 09:15:10 -0500
committerGravatar Subv <subv2112@gmail.com>2015-05-11 09:15:10 -0500
commit41f74a16fd55934f747f6f7e1f7a6d4d6a3d4e57 (patch)
treeb9500ee328f5b918edca38251878c4f346a30807 /src/core/hle/kernel/thread.cpp
parente98fbadf4a49eecc6d39c082cba683d5d88ea2c5 (diff)
Core/HLE: Implemented the SVCs GetProcessId and GetProcessIdOfThread
Diffstat (limited to 'src/core/hle/kernel/thread.cpp')
-rw-r--r--src/core/hle/kernel/thread.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp
index 5de8f9a7..56ded72c 100644
--- a/src/core/hle/kernel/thread.cpp
+++ b/src/core/hle/kernel/thread.cpp
@@ -17,6 +17,7 @@
#include "core/core_timing.h"
#include "core/hle/hle.h"
#include "core/hle/kernel/kernel.h"
+#include "core/hle/kernel/process.h"
#include "core/hle/kernel/thread.h"
#include "core/hle/kernel/mutex.h"
#include "core/hle/result.h"
@@ -402,6 +403,7 @@ ResultVal<SharedPtr<Thread>> Thread::Create(std::string name, VAddr entry_point,
thread->wait_address = 0;
thread->name = std::move(name);
thread->callback_handle = wakeup_callback_handle_table.Create(thread).MoveFrom();
+ thread->owner_process = g_current_process;
VAddr tls_address = Memory::TLS_AREA_VADDR + (thread->thread_id - 1) * 0x200;