diff options
author | bunnei <bunneidev@gmail.com> | 2021-02-13 02:02:51 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2021-02-19 01:16:25 +0100 |
commit | 65e0178cc09299550aee949d7b89e211017bddee (patch) | |
tree | 97abf71a48320fc5628b4946d793191f2fb9dbb0 /src/core/hle/kernel/k_shared_memory.cpp | |
parent | hle: kernel: Migrate SlabHeap to KSlabHeap. (diff) | |
download | yuzu-65e0178cc09299550aee949d7b89e211017bddee.tar yuzu-65e0178cc09299550aee949d7b89e211017bddee.tar.gz yuzu-65e0178cc09299550aee949d7b89e211017bddee.tar.bz2 yuzu-65e0178cc09299550aee949d7b89e211017bddee.tar.lz yuzu-65e0178cc09299550aee949d7b89e211017bddee.tar.xz yuzu-65e0178cc09299550aee949d7b89e211017bddee.tar.zst yuzu-65e0178cc09299550aee949d7b89e211017bddee.zip |
Diffstat (limited to 'src/core/hle/kernel/k_shared_memory.cpp')
-rw-r--r-- | src/core/hle/kernel/k_shared_memory.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/core/hle/kernel/k_shared_memory.cpp b/src/core/hle/kernel/k_shared_memory.cpp index dd82e0217..eb48afe9d 100644 --- a/src/core/hle/kernel/k_shared_memory.cpp +++ b/src/core/hle/kernel/k_shared_memory.cpp @@ -20,8 +20,8 @@ KSharedMemory::~KSharedMemory() { std::shared_ptr<KSharedMemory> KSharedMemory::Create( KernelCore& kernel, Core::DeviceMemory& device_memory, Process* owner_process, - Memory::PageLinkedList&& page_list, Memory::MemoryPermission owner_permission, - Memory::MemoryPermission user_permission, PAddr physical_address, std::size_t size, + Memory::PageLinkedList&& page_list, KMemoryPermission owner_permission, + KMemoryPermission user_permission, PAddr physical_address, std::size_t size, std::string name) { const auto resource_limit = kernel.GetSystemResourceLimit(); @@ -45,21 +45,21 @@ std::shared_ptr<KSharedMemory> KSharedMemory::Create( } ResultCode KSharedMemory::Map(Process& target_process, VAddr address, std::size_t size, - Memory::MemoryPermission permissions) { - const u64 page_count{(size + Memory::PageSize - 1) / Memory::PageSize}; + KMemoryPermission permissions) { + const u64 page_count{(size + PageSize - 1) / PageSize}; if (page_list.GetNumPages() != page_count) { UNIMPLEMENTED_MSG("Page count does not match"); } - const Memory::MemoryPermission expected = + const KMemoryPermission expected = &target_process == owner_process ? owner_permission : user_permission; if (permissions != expected) { UNIMPLEMENTED_MSG("Permission does not match"); } - return target_process.PageTable().MapPages(address, page_list, Memory::MemoryState::Shared, + return target_process.PageTable().MapPages(address, page_list, KMemoryState::Shared, permissions); } |