Skip to content

Commit

Permalink
sys_spu: Fix sys_spu_thread_group_terminate vs sys_spu_thread_group_e…
Browse files Browse the repository at this point in the history
…xit race on values
  • Loading branch information
elad335 committed May 14, 2020
1 parent 91d06a9 commit 471a491
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions rpcs3/Emu/Cell/SPUThread.cpp
Expand Up @@ -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)
Expand Down

0 comments on commit 471a491

Please sign in to comment.