diff options
author | Liam <byteslice@airmail.cc> | 2023-03-07 16:49:41 +0100 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2023-03-13 03:09:09 +0100 |
commit | c0b9e93b77cca0e5fbd455efc5dec10199ef8184 (patch) | |
tree | 2e6e76c5075bc46695b9c8a178deaadc11b3eb99 /src/core/hle/kernel/k_shared_memory.cpp | |
parent | kernel: remove gratitutous attribute usage (diff) | |
download | yuzu-c0b9e93b77cca0e5fbd455efc5dec10199ef8184.tar yuzu-c0b9e93b77cca0e5fbd455efc5dec10199ef8184.tar.gz yuzu-c0b9e93b77cca0e5fbd455efc5dec10199ef8184.tar.bz2 yuzu-c0b9e93b77cca0e5fbd455efc5dec10199ef8184.tar.lz yuzu-c0b9e93b77cca0e5fbd455efc5dec10199ef8184.tar.xz yuzu-c0b9e93b77cca0e5fbd455efc5dec10199ef8184.tar.zst yuzu-c0b9e93b77cca0e5fbd455efc5dec10199ef8184.zip |
Diffstat (limited to 'src/core/hle/kernel/k_shared_memory.cpp')
-rw-r--r-- | src/core/hle/kernel/k_shared_memory.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/hle/kernel/k_shared_memory.cpp b/src/core/hle/kernel/k_shared_memory.cpp index bf134f7c8..b7b3b612b 100644 --- a/src/core/hle/kernel/k_shared_memory.cpp +++ b/src/core/hle/kernel/k_shared_memory.cpp @@ -12,7 +12,7 @@ namespace Kernel { -KSharedMemory::KSharedMemory(KernelCore& kernel_) : KAutoObjectWithSlabHeapAndContainer{kernel_} {} +KSharedMemory::KSharedMemory(KernelCore& kernel) : KAutoObjectWithSlabHeapAndContainer{kernel} {} KSharedMemory::~KSharedMemory() = default; Result KSharedMemory::Initialize(Core::DeviceMemory& device_memory, KProcess* owner_process, @@ -28,7 +28,7 @@ Result KSharedMemory::Initialize(Core::DeviceMemory& device_memory, KProcess* ow const size_t num_pages = Common::DivideUp(size, PageSize); // Get the resource limit. - KResourceLimit* reslimit = kernel.GetSystemResourceLimit(); + KResourceLimit* reslimit = m_kernel.GetSystemResourceLimit(); // Reserve memory for ourselves. KScopedResourceReservation memory_reservation(reslimit, LimitableResource::PhysicalMemoryMax, @@ -40,11 +40,11 @@ Result KSharedMemory::Initialize(Core::DeviceMemory& device_memory, KProcess* ow //! HACK: Open continuous mapping from sysmodule pool. auto option = KMemoryManager::EncodeOption(KMemoryManager::Pool::Secure, KMemoryManager::Direction::FromBack); - m_physical_address = kernel.MemoryManager().AllocateAndOpenContinuous(num_pages, 1, option); + m_physical_address = m_kernel.MemoryManager().AllocateAndOpenContinuous(num_pages, 1, option); R_UNLESS(m_physical_address != 0, ResultOutOfMemory); //! Insert the result into our page group. - m_page_group.emplace(kernel, &kernel.GetSystemSystemResource().GetBlockInfoManager()); + m_page_group.emplace(m_kernel, &m_kernel.GetSystemSystemResource().GetBlockInfoManager()); m_page_group->AddBlock(m_physical_address, num_pages); // Commit our reservation. |