SPU: Fix spu_thread::cpu_stop() missed executions (#8656)

This commit is contained in:
Eladash 2020-07-30 12:07:18 +03:00 committed by GitHub
parent ebf832214e
commit 82068cf802
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 23 additions and 12 deletions

View file

@ -433,11 +433,21 @@ void cpu_thread::operator()()
if (!(state & cpu_flag::stop))
{
cpu_task();
state -= cpu_flag::ret;
if (state & cpu_flag::ret && state.test_and_reset(cpu_flag::ret))
{
cpu_return();
}
continue;
}
thread_ctrl::wait();
if (state & cpu_flag::ret && state.test_and_reset(cpu_flag::ret))
{
cpu_return();
}
}
// Complete cleanup gracefully