diff options
author | Liam <byteslice@airmail.cc> | 2023-02-13 16:44:41 +0100 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2023-02-13 17:05:14 +0100 |
commit | 4363ca304afb0b615481c7d49e863a2c429cc5c6 (patch) | |
tree | 80dbba25e98a8493944993f8992326b797305088 /src/core/hle/kernel/svc/svc_process.cpp | |
parent | Merge pull request #9784 from m-HD/master (diff) | |
download | yuzu-4363ca304afb0b615481c7d49e863a2c429cc5c6.tar yuzu-4363ca304afb0b615481c7d49e863a2c429cc5c6.tar.gz yuzu-4363ca304afb0b615481c7d49e863a2c429cc5c6.tar.bz2 yuzu-4363ca304afb0b615481c7d49e863a2c429cc5c6.tar.lz yuzu-4363ca304afb0b615481c7d49e863a2c429cc5c6.tar.xz yuzu-4363ca304afb0b615481c7d49e863a2c429cc5c6.tar.zst yuzu-4363ca304afb0b615481c7d49e863a2c429cc5c6.zip |
Diffstat (limited to 'src/core/hle/kernel/svc/svc_process.cpp')
-rw-r--r-- | src/core/hle/kernel/svc/svc_process.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/core/hle/kernel/svc/svc_process.cpp b/src/core/hle/kernel/svc/svc_process.cpp index d2c20aad2..c35d2be76 100644 --- a/src/core/hle/kernel/svc/svc_process.cpp +++ b/src/core/hle/kernel/svc/svc_process.cpp @@ -9,7 +9,7 @@ namespace Kernel::Svc { /// Exits the current process void ExitProcess(Core::System& system) { - auto* current_process = system.Kernel().CurrentProcess(); + auto* current_process = GetCurrentProcessPointer(system.Kernel()); LOG_INFO(Kernel_SVC, "Process {} exiting", current_process->GetProcessID()); ASSERT_MSG(current_process->GetState() == KProcess::State::Running, @@ -23,9 +23,9 @@ Result GetProcessId(Core::System& system, u64* out_process_id, Handle handle) { LOG_DEBUG(Kernel_SVC, "called handle=0x{:08X}", handle); // Get the object from the handle table. - KScopedAutoObject obj = - system.Kernel().CurrentProcess()->GetHandleTable().GetObject<KAutoObject>( - static_cast<Handle>(handle)); + KScopedAutoObject obj = GetCurrentProcess(system.Kernel()) + .GetHandleTable() + .GetObject<KAutoObject>(static_cast<Handle>(handle)); R_UNLESS(obj.IsNotNull(), ResultInvalidHandle); // Get the process from the object. @@ -63,10 +63,10 @@ Result GetProcessList(Core::System& system, s32* out_num_processes, VAddr out_pr return ResultOutOfRange; } - const auto& kernel = system.Kernel(); + auto& kernel = system.Kernel(); const auto total_copy_size = out_process_ids_size * sizeof(u64); - if (out_process_ids_size > 0 && !kernel.CurrentProcess()->PageTable().IsInsideAddressSpace( + if (out_process_ids_size > 0 && !GetCurrentProcess(kernel).PageTable().IsInsideAddressSpace( out_process_ids, total_copy_size)) { LOG_ERROR(Kernel_SVC, "Address range outside address space. begin=0x{:016X}, end=0x{:016X}", out_process_ids, out_process_ids + total_copy_size); @@ -92,7 +92,7 @@ Result GetProcessInfo(Core::System& system, s64* out, Handle process_handle, ProcessInfoType info_type) { LOG_DEBUG(Kernel_SVC, "called, handle=0x{:08X}, type=0x{:X}", process_handle, info_type); - const auto& handle_table = system.Kernel().CurrentProcess()->GetHandleTable(); + const auto& handle_table = GetCurrentProcess(system.Kernel()).GetHandleTable(); KScopedAutoObject process = handle_table.GetObject<KProcess>(process_handle); if (process.IsNull()) { LOG_ERROR(Kernel_SVC, "Process handle does not exist, process_handle=0x{:08X}", |