kernel: pass ref to shared memory

This commit is contained in:
Weiyi Wang 2018-10-13 17:08:37 -04:00
parent 2a411bb501
commit 87426b29ff
14 changed files with 95 additions and 88 deletions

View file

@ -1105,9 +1105,9 @@ static ResultCode CreateMemoryBlock(Handle* out_handle, u32 addr, u32 size, u32
if (addr == 0 && g_current_process->flags.shared_device_mem)
region = g_current_process->flags.memory_region;
shared_memory =
SharedMemory::Create(g_current_process, size, static_cast<MemoryPermission>(my_permission),
static_cast<MemoryPermission>(other_permission), addr, region);
shared_memory = Core::System::GetInstance().Kernel().CreateSharedMemory(
g_current_process, size, static_cast<MemoryPermission>(my_permission),
static_cast<MemoryPermission>(other_permission), addr, region);
CASCADE_RESULT(*out_handle, g_handle_table.Create(std::move(shared_memory)));
LOG_WARNING(Kernel_SVC, "called addr=0x{:08X}", addr);