mirror of https://github.com/RPCS3/rpcs3.git
parent
a58c12db0b
commit
7f28489c70
|
@ -28,7 +28,15 @@ struct ppu_thread_cleaner
|
||||||
{
|
{
|
||||||
if (u32 id = old_id.exchange(new_id)) [[likely]]
|
if (u32 id = old_id.exchange(new_id)) [[likely]]
|
||||||
{
|
{
|
||||||
if (!idm::remove<named_thread<ppu_thread>>(id)) [[unlikely]]
|
auto ppu = idm::get<named_thread<ppu_thread>>(id);
|
||||||
|
|
||||||
|
if (ppu)
|
||||||
|
{
|
||||||
|
// Join thread
|
||||||
|
(*ppu)();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!ppu || !idm::remove_verify<named_thread<ppu_thread>>(id, std::move(ppu))) [[unlikely]]
|
||||||
{
|
{
|
||||||
sys_ppu_thread.fatal("Failed to remove detached thread 0x%x", id);
|
sys_ppu_thread.fatal("Failed to remove detached thread 0x%x", id);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue