From 4363ca304afb0b615481c7d49e863a2c429cc5c6 Mon Sep 17 00:00:00 2001 From: Liam Date: Mon, 13 Feb 2023 10:44:41 -0500 Subject: kernel: use GetCurrentProcess --- src/core/hle/kernel/svc/svc_info.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/core/hle/kernel/svc/svc_info.cpp') diff --git a/src/core/hle/kernel/svc/svc_info.cpp b/src/core/hle/kernel/svc/svc_info.cpp index ad56e2fe6..58dc47508 100644 --- a/src/core/hle/kernel/svc/svc_info.cpp +++ b/src/core/hle/kernel/svc/svc_info.cpp @@ -44,7 +44,7 @@ Result GetInfo(Core::System& system, u64* result, InfoType info_id_type, Handle return ResultInvalidEnumValue; } - const auto& handle_table = system.Kernel().CurrentProcess()->GetHandleTable(); + const auto& handle_table = GetCurrentProcess(system.Kernel()).GetHandleTable(); KScopedAutoObject process = handle_table.GetObject(handle); if (process.IsNull()) { LOG_ERROR(Kernel_SVC, "Process is not valid! info_id={}, info_sub_id={}, handle={:08X}", @@ -154,7 +154,7 @@ Result GetInfo(Core::System& system, u64* result, InfoType info_id_type, Handle return ResultInvalidCombination; } - KProcess* const current_process = system.Kernel().CurrentProcess(); + KProcess* const current_process = GetCurrentProcessPointer(system.Kernel()); KHandleTable& handle_table = current_process->GetHandleTable(); const auto resource_limit = current_process->GetResourceLimit(); if (!resource_limit) { @@ -183,7 +183,7 @@ Result GetInfo(Core::System& system, u64* result, InfoType info_id_type, Handle return ResultInvalidCombination; } - *result = system.Kernel().CurrentProcess()->GetRandomEntropy(info_sub_id); + *result = GetCurrentProcess(system.Kernel()).GetRandomEntropy(info_sub_id); return ResultSuccess; case InfoType::InitialProcessIdRange: @@ -200,9 +200,9 @@ Result GetInfo(Core::System& system, u64* result, InfoType info_id_type, Handle return ResultInvalidCombination; } - KScopedAutoObject thread = - system.Kernel().CurrentProcess()->GetHandleTable().GetObject( - static_cast(handle)); + KScopedAutoObject thread = GetCurrentProcess(system.Kernel()) + .GetHandleTable() + .GetObject(static_cast(handle)); if (thread.IsNull()) { LOG_ERROR(Kernel_SVC, "Thread handle does not exist, handle=0x{:08X}", static_cast(handle)); @@ -249,7 +249,7 @@ Result GetInfo(Core::System& system, u64* result, InfoType info_id_type, Handle R_UNLESS(info_sub_id == 0, ResultInvalidCombination); // Get the handle table. - KProcess* current_process = system.Kernel().CurrentProcess(); + KProcess* current_process = GetCurrentProcessPointer(system.Kernel()); KHandleTable& handle_table = current_process->GetHandleTable(); // Get a new handle for the current process. -- cgit v1.2.3