Kernel/Thread: Allow specifying which process a thread belongs to when creating it.

Don't automatically assume that Thread::Create will only be called when the parent process is currently scheduled. This assumption will be broken when applets or system modules are loaded.
This commit is contained in:
Subv 2017-09-26 17:40:49 -05:00
parent a8d2f5787f
commit 3165466b66
4 changed files with 22 additions and 17 deletions

View file

@ -147,7 +147,7 @@ void Process::Run(s32 main_thread_priority, u32 stack_size) {
}
vm_manager.LogLayout(Log::Level::Debug);
Kernel::SetupMainThread(codeset->entrypoint, main_thread_priority);
Kernel::SetupMainThread(codeset->entrypoint, main_thread_priority, this);
}
VAddr Process::GetLinearHeapAreaAddress() const {