LV2: Fixup for IPC

* Fix typo in lv2_obj::create.
* Always save ipc_key as 0 for non-shared object creations, regardless of thbe value set by creation attribute.
* Show IPC key of shared memory (sys_mmapper) memory objects in kernel explorer.
This commit is contained in:
Eladash 2021-05-07 13:08:16 +03:00 committed by Ivan
parent 900ebf6583
commit 64997662d2
15 changed files with 63 additions and 42 deletions

View file

@ -36,9 +36,11 @@ error_code sys_semaphore_create(ppu_thread& ppu, vm::ptr<u32> sem_id, vm::ptr<sy
return CELL_EINVAL;
}
if (auto error = lv2_obj::create<lv2_sema>(_attr.pshared, _attr.ipc_key, _attr.flags, [&]
const u64 ipc_key = lv2_obj::get_key(_attr);
if (auto error = lv2_obj::create<lv2_sema>(_attr.pshared, ipc_key, _attr.flags, [&]
{
return std::make_shared<lv2_sema>(protocol, _attr.pshared, _attr.ipc_key, _attr.name_u64, max_val, initial_val);
return std::make_shared<lv2_sema>(protocol, ipc_key, _attr.name_u64, max_val, initial_val);
}))
{
return error;
@ -66,7 +68,7 @@ error_code sys_semaphore_destroy(ppu_thread& ppu, u32 sem_id)
return CELL_EBUSY;
}
lv2_obj::on_id_destroy(sema, sema.shared, sema.key);
lv2_obj::on_id_destroy(sema, sema.key);
return {};
});