mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-04 14:08:37 +00: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