diff options
author | Lioncash <mathew1800@gmail.com> | 2020-04-24 00:42:11 +0200 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2020-04-24 00:42:14 +0200 |
commit | ce7c02735ec3a8e87f46f64556c6d5ede18c699d (patch) | |
tree | 3fefd1e33abb79cc1cc4731ee6bf12d871772520 /src | |
parent | Merge pull request #3768 from H27CK/cmd-title-fmt (diff) | |
download | yuzu-ce7c02735ec3a8e87f46f64556c6d5ede18c699d.tar yuzu-ce7c02735ec3a8e87f46f64556c6d5ede18c699d.tar.gz yuzu-ce7c02735ec3a8e87f46f64556c6d5ede18c699d.tar.bz2 yuzu-ce7c02735ec3a8e87f46f64556c6d5ede18c699d.tar.lz yuzu-ce7c02735ec3a8e87f46f64556c6d5ede18c699d.tar.xz yuzu-ce7c02735ec3a8e87f46f64556c6d5ede18c699d.tar.zst yuzu-ce7c02735ec3a8e87f46f64556c6d5ede18c699d.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/core/hle/kernel/shared_memory.cpp | 8 | ||||
-rw-r--r-- | src/core/hle/kernel/shared_memory.h | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/core/hle/kernel/shared_memory.cpp b/src/core/hle/kernel/shared_memory.cpp index c67696757..0cd467110 100644 --- a/src/core/hle/kernel/shared_memory.cpp +++ b/src/core/hle/kernel/shared_memory.cpp @@ -36,22 +36,22 @@ std::shared_ptr<SharedMemory> SharedMemory::Create( } ResultCode SharedMemory::Map(Process& target_process, VAddr address, std::size_t size, - Memory::MemoryPermission permission) { + Memory::MemoryPermission permissions) { const u64 page_count{(size + Memory::PageSize - 1) / Memory::PageSize}; if (page_list.GetNumPages() != page_count) { UNIMPLEMENTED_MSG("Page count does not match"); } - Memory::MemoryPermission expected = + const Memory::MemoryPermission expected = &target_process == owner_process ? owner_permission : user_permission; - if (permission != expected) { + if (permissions != expected) { UNIMPLEMENTED_MSG("Permission does not match"); } return target_process.PageTable().MapPages(address, page_list, Memory::MemoryState::Shared, - permission); + permissions); } } // namespace Kernel diff --git a/src/core/hle/kernel/shared_memory.h b/src/core/hle/kernel/shared_memory.h index cd16d6412..0ef87235c 100644 --- a/src/core/hle/kernel/shared_memory.h +++ b/src/core/hle/kernel/shared_memory.h @@ -51,7 +51,7 @@ public: * @param permissions Memory block map permissions (specified by SVC field) */ ResultCode Map(Process& target_process, VAddr address, std::size_t size, - Memory::MemoryPermission permission); + Memory::MemoryPermission permissions); /** * Gets a pointer to the shared memory block |