diff options
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/kernel/k_transfer_memory.cpp | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/src/core/hle/kernel/k_transfer_memory.cpp b/src/core/hle/kernel/k_transfer_memory.cpp index 9f34c2d46..13d34125c 100644 --- a/src/core/hle/kernel/k_transfer_memory.cpp +++ b/src/core/hle/kernel/k_transfer_memory.cpp @@ -8,32 +8,29 @@ namespace Kernel { -KTransferMemory::KTransferMemory(KernelCore& kernel_) - : KAutoObjectWithSlabHeapAndContainer{kernel_} {} +KTransferMemory::KTransferMemory(KernelCore& kernel) + : KAutoObjectWithSlabHeapAndContainer{kernel} {} KTransferMemory::~KTransferMemory() = default; -Result KTransferMemory::Initialize(VAddr address_, std::size_t size_, - Svc::MemoryPermission owner_perm_) { +Result KTransferMemory::Initialize(KProcessAddress address, std::size_t size, + Svc::MemoryPermission owner_perm) { // Set members. - owner = kernel.CurrentProcess(); + m_owner = GetCurrentProcessPointer(m_kernel); // TODO(bunnei): Lock for transfer memory // Set remaining tracking members. - owner->Open(); - owner_perm = owner_perm_; - address = address_; - size = size_; - is_initialized = true; + m_owner->Open(); + m_owner_perm = owner_perm; + m_address = address; + m_size = size; + m_is_initialized = true; - return ResultSuccess; + R_SUCCEED(); } -void KTransferMemory::Finalize() { - // Perform inherited finalization. - KAutoObjectWithSlabHeapAndContainer<KTransferMemory, KAutoObjectWithList>::Finalize(); -} +void KTransferMemory::Finalize() {} void KTransferMemory::PostDestroy(uintptr_t arg) { KProcess* owner = reinterpret_cast<KProcess*>(arg); |