idm: Fix minor race in cellVdecClose, sys_raw_spu_destroy...

Because of racing removal of IDs vs the shared pointer owned object
This commit is contained in:
Eladash 2020-03-14 13:27:18 +02:00
parent efe6e1eb0a
commit c16124f0d9
6 changed files with 33 additions and 20 deletions

View file

@ -120,7 +120,7 @@ void sys_mempool_destroy(ppu_thread& ppu, sys_mempool_t mempool)
u32 mutexid = memory_pool->mutexid;
sys_mutex_lock(ppu, memory_pool->mutexid, 0);
idm::remove<memory_pool_t>(mempool);
idm::remove_verify<memory_pool_t>(mempool, std::move(memory_pool));
sys_mutex_unlock(ppu, mutexid);
sys_mutex_destroy(ppu, mutexid);
sys_cond_destroy(ppu, condid);