mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-09 08:21:29 +12:00
SPU: Postpone notifications to afterward group mutex ownership
This commit is contained in:
parent
bc728db15b
commit
c7fbc16357
2 changed files with 42 additions and 5 deletions
|
@ -5031,9 +5031,6 @@ bool spu_thread::stop_and_signal(u32 code)
|
|||
flags += cpu_flag::stop + cpu_flag::ret;
|
||||
return true;
|
||||
});
|
||||
|
||||
if (thread.get() != this)
|
||||
thread_ctrl::notify(*thread);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5043,6 +5040,18 @@ bool spu_thread::stop_and_signal(u32 code)
|
|||
break;
|
||||
}
|
||||
|
||||
for (auto& thread : group->threads)
|
||||
{
|
||||
if (thread)
|
||||
{
|
||||
// Notify threads, guess which threads need a notification by checking cpu_flag::ret (redundant notification can only occur if thread has called an exit syscall itself as well)
|
||||
if (thread.get() != this && thread->state & cpu_flag::ret)
|
||||
{
|
||||
thread_ctrl::notify(*thread);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
check_state();
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue