summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/svc/svc_memory.cpp
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2023-02-13 16:44:41 +0100
committerLiam <byteslice@airmail.cc>2023-02-13 17:05:14 +0100
commit4363ca304afb0b615481c7d49e863a2c429cc5c6 (patch)
tree80dbba25e98a8493944993f8992326b797305088 /src/core/hle/kernel/svc/svc_memory.cpp
parentMerge pull request #9784 from m-HD/master (diff)
downloadyuzu-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_memory.cpp')
-rw-r--r--src/core/hle/kernel/svc/svc_memory.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/hle/kernel/svc/svc_memory.cpp b/src/core/hle/kernel/svc/svc_memory.cpp
index 21f818da6..214bcd073 100644
--- a/src/core/hle/kernel/svc/svc_memory.cpp
+++ b/src/core/hle/kernel/svc/svc_memory.cpp
@@ -113,7 +113,7 @@ Result SetMemoryPermission(Core::System& system, VAddr address, u64 size, Memory
R_UNLESS(IsValidSetMemoryPermission(perm), ResultInvalidNewMemoryPermission);
// Validate that the region is in range for the current process.
- auto& page_table = system.Kernel().CurrentProcess()->PageTable();
+ auto& page_table = GetCurrentProcess(system.Kernel()).PageTable();
R_UNLESS(page_table.Contains(address, size), ResultInvalidCurrentMemory);
// Set the memory attribute.
@@ -137,7 +137,7 @@ Result SetMemoryAttribute(Core::System& system, VAddr address, u64 size, u32 mas
R_UNLESS((mask | attr | SupportedMask) == SupportedMask, ResultInvalidCombination);
// Validate that the region is in range for the current process.
- auto& page_table{system.Kernel().CurrentProcess()->PageTable()};
+ auto& page_table{GetCurrentProcess(system.Kernel()).PageTable()};
R_UNLESS(page_table.Contains(address, size), ResultInvalidCurrentMemory);
// Set the memory attribute.
@@ -149,7 +149,7 @@ Result MapMemory(Core::System& system, VAddr dst_addr, VAddr src_addr, u64 size)
LOG_TRACE(Kernel_SVC, "called, dst_addr=0x{:X}, src_addr=0x{:X}, size=0x{:X}", dst_addr,
src_addr, size);
- auto& page_table{system.Kernel().CurrentProcess()->PageTable()};
+ auto& page_table{GetCurrentProcess(system.Kernel()).PageTable()};
if (const Result result{MapUnmapMemorySanityChecks(page_table, dst_addr, src_addr, size)};
result.IsError()) {
@@ -164,7 +164,7 @@ Result UnmapMemory(Core::System& system, VAddr dst_addr, VAddr src_addr, u64 siz
LOG_TRACE(Kernel_SVC, "called, dst_addr=0x{:X}, src_addr=0x{:X}, size=0x{:X}", dst_addr,
src_addr, size);
- auto& page_table{system.Kernel().CurrentProcess()->PageTable()};
+ auto& page_table{GetCurrentProcess(system.Kernel()).PageTable()};
if (const Result result{MapUnmapMemorySanityChecks(page_table, dst_addr, src_addr, size)};
result.IsError()) {