summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/svc/svc_process_memory.cpp
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2023-02-15 23:42:45 +0100
committerGitHub <noreply@github.com>2023-02-15 23:42:45 +0100
commit6d77de96dae4763ef78fdea1918b582e5e181653 (patch)
tree0c131de68a68c23f62a8a253b3cf69d3bfc91ee7 /src/core/hle/kernel/svc/svc_process_memory.cpp
parentMerge pull request #9782 from arades79/fix-consexpr-value-declaration-usage (diff)
parentgeneral: rename CurrentProcess to ApplicationProcess (diff)
downloadyuzu-6d77de96dae4763ef78fdea1918b582e5e181653.tar
yuzu-6d77de96dae4763ef78fdea1918b582e5e181653.tar.gz
yuzu-6d77de96dae4763ef78fdea1918b582e5e181653.tar.bz2
yuzu-6d77de96dae4763ef78fdea1918b582e5e181653.tar.lz
yuzu-6d77de96dae4763ef78fdea1918b582e5e181653.tar.xz
yuzu-6d77de96dae4763ef78fdea1918b582e5e181653.tar.zst
yuzu-6d77de96dae4763ef78fdea1918b582e5e181653.zip
Diffstat (limited to 'src/core/hle/kernel/svc/svc_process_memory.cpp')
-rw-r--r--src/core/hle/kernel/svc/svc_process_memory.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/hle/kernel/svc/svc_process_memory.cpp b/src/core/hle/kernel/svc/svc_process_memory.cpp
index dbe24e139..4dfd9e5bb 100644
--- a/src/core/hle/kernel/svc/svc_process_memory.cpp
+++ b/src/core/hle/kernel/svc/svc_process_memory.cpp
@@ -45,7 +45,7 @@ Result SetProcessMemoryPermission(Core::System& system, Handle process_handle, V
// Get the process from its handle.
KScopedAutoObject process =
- system.CurrentProcess()->GetHandleTable().GetObject<KProcess>(process_handle);
+ GetCurrentProcess(system.Kernel()).GetHandleTable().GetObject<KProcess>(process_handle);
R_UNLESS(process.IsNotNull(), ResultInvalidHandle);
// Validate that the address is in range.
@@ -71,7 +71,7 @@ Result MapProcessMemory(Core::System& system, VAddr dst_address, Handle process_
R_UNLESS((src_address < src_address + size), ResultInvalidCurrentMemory);
// Get the processes.
- KProcess* dst_process = system.CurrentProcess();
+ KProcess* dst_process = GetCurrentProcessPointer(system.Kernel());
KScopedAutoObject src_process =
dst_process->GetHandleTable().GetObjectWithoutPseudoHandle<KProcess>(process_handle);
R_UNLESS(src_process.IsNotNull(), ResultInvalidHandle);
@@ -114,7 +114,7 @@ Result UnmapProcessMemory(Core::System& system, VAddr dst_address, Handle proces
R_UNLESS((src_address < src_address + size), ResultInvalidCurrentMemory);
// Get the processes.
- KProcess* dst_process = system.CurrentProcess();
+ KProcess* dst_process = GetCurrentProcessPointer(system.Kernel());
KScopedAutoObject src_process =
dst_process->GetHandleTable().GetObjectWithoutPseudoHandle<KProcess>(process_handle);
R_UNLESS(src_process.IsNotNull(), ResultInvalidHandle);
@@ -174,7 +174,7 @@ Result MapProcessCodeMemory(Core::System& system, Handle process_handle, u64 dst
return ResultInvalidCurrentMemory;
}
- 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, "Invalid process handle specified (handle=0x{:08X}).",
@@ -242,7 +242,7 @@ Result UnmapProcessCodeMemory(Core::System& system, Handle process_handle, u64 d
return ResultInvalidCurrentMemory;
}
- 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, "Invalid process handle specified (handle=0x{:08X}).",