mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-13 18:28:35 +12:00
Fix race condion in sys_spu_thread_group_join
This commit is contained in:
parent
84d42ecb65
commit
fa647bc121
1 changed files with 2 additions and 2 deletions
|
@ -648,7 +648,7 @@ error_code sys_spu_thread_group_join(ppu_thread& ppu, u32 id, vm::ptr<u32> cause
|
|||
return CELL_EBUSY;
|
||||
}
|
||||
|
||||
if (group->join_state)
|
||||
if (group->join_state && group->run_state == SPU_THREAD_GROUP_STATUS_INITIALIZED)
|
||||
{
|
||||
// Already signaled
|
||||
ppu.gpr[4] = group->join_state;
|
||||
|
@ -664,7 +664,7 @@ error_code sys_spu_thread_group_join(ppu_thread& ppu, u32 id, vm::ptr<u32> cause
|
|||
|
||||
lv2_obj::sleep(ppu);
|
||||
|
||||
while (!group->join_state)
|
||||
while (!group->join_state || group->run_state != SPU_THREAD_GROUP_STATUS_INITIALIZED)
|
||||
{
|
||||
if (ppu.is_stopped())
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue