SPU TG: add thread group stop counter

Fix possible race condition introduced by waiting on `running` value
This commit is contained in:
Nekotekina 2018-11-27 20:00:07 +03:00
parent febe4d4a10
commit f442a8a84c
3 changed files with 9 additions and 2 deletions

View file

@ -487,6 +487,7 @@ void spu_thread::cpu_stop()
if (verify(HERE, group->running--) == 1)
{
// Notify on last thread stopped
group->stop_count++;
group->mutex.lock_unlock();
group->cond.notify_all();
}