mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-10 08:51:28 +12:00
SPU: ensure sys_spu_thread_group_join receives correct exit status
Following #5334
This commit is contained in:
parent
453344c232
commit
cfdf50dcff
3 changed files with 27 additions and 12 deletions
|
@ -487,9 +487,16 @@ void spu_thread::cpu_stop()
|
|||
if (verify(HERE, group->running--) == 1)
|
||||
{
|
||||
{
|
||||
group->stop_count++;
|
||||
std::lock_guard lock(group->mutex);
|
||||
group->stop_count++;
|
||||
group->run_state = SPU_THREAD_GROUP_STATUS_INITIALIZED;
|
||||
|
||||
if (const auto ppu = std::exchange(group->waiter, nullptr))
|
||||
{
|
||||
// Send exit status directly to the joining thread
|
||||
ppu->gpr[4] = group->join_state;
|
||||
ppu->gpr[5] = group->exit_status;
|
||||
}
|
||||
}
|
||||
|
||||
// Notify on last thread stopped
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue