1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-22 10:42:36 +01:00

sys_spu: Fix sys_spu_thread_group_terminate vs sys_spu_thread_group_exit race on values

This commit is contained in:
Eladash 2020-05-14 17:43:53 +03:00 committed by Ani
parent 91d06a9729
commit 54dd9f4eae

View File

@ -3179,6 +3179,12 @@ bool spu_thread::stop_and_signal(u32 code)
continue;
}
if (std::exchange(group->set_terminate, true))
{
// Whoever terminated first decides the error status + cause
return true;
}
for (auto& thread : group->threads)
{
if (thread && thread.get() != this)