kernel/process: move current process to kernel instance

Two functional change:
QueryProcessMemory uses the process passed from handle instead current_process
Thread::Stop() uses TLS from owner_process instead of current_process
This commit is contained in:
Weiyi Wang
2018-10-17 15:23:56 -04:00
parent d9342622b0
commit 8fb3d8ff38
19 changed files with 96 additions and 55 deletions

View File

@@ -258,7 +258,7 @@ ResultVal<AppletManager::InitializeResult> AppletManager::Initialize(AppletId ap
slot_data->applet_id = static_cast<AppletId>(app_id);
// Note: In the real console the title id of a given applet slot is set by the APT module when
// calling StartApplication.
slot_data->title_id = Kernel::g_current_process->codeset->program_id;
slot_data->title_id = system.Kernel().GetCurrentProcess()->codeset->program_id;
slot_data->attributes.raw = attributes.raw;
if (slot_data->applet_id == AppletId::Application ||