mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-12 01:38:37 +12:00
sys_spu: Fix overexecution of cpu_return()
This commit is contained in:
parent
7ce790f369
commit
3206378ae6
2 changed files with 26 additions and 5 deletions
|
@ -3352,10 +3352,22 @@ bool spu_thread::stop_and_signal(u32 code)
|
|||
|
||||
for (auto& thread : group->threads)
|
||||
{
|
||||
if (thread && thread.get() != this)
|
||||
if (thread)
|
||||
{
|
||||
thread->state += cpu_flag::stop + cpu_flag::ret;
|
||||
thread_ctrl::raw_notify(*thread);
|
||||
thread->state.fetch_op([](bs_t<cpu_flag>& flags)
|
||||
{
|
||||
if (flags & cpu_flag::stop)
|
||||
{
|
||||
// In case the thread raised the ret flag itself at some point do not raise it again
|
||||
return false;
|
||||
}
|
||||
|
||||
flags += cpu_flag::stop + cpu_flag::ret;
|
||||
return true;
|
||||
});
|
||||
|
||||
if (thread.get() != this)
|
||||
thread_ctrl::raw_notify(*thread);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3365,7 +3377,6 @@ bool spu_thread::stop_and_signal(u32 code)
|
|||
break;
|
||||
}
|
||||
|
||||
state += cpu_flag::stop + cpu_flag::ret;
|
||||
check_state();
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue