mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-29 00:33:01 +00:00
CPU: Fix g_suspend_counter waiting logic
This commit is contained in:
parent
28cbba5a7d
commit
190676c982
@ -738,13 +738,16 @@ bool cpu_thread::check_state() noexcept
|
||||
{
|
||||
u64 ctr = g_suspend_counter;
|
||||
|
||||
if (i < 20 || ctr & 1)
|
||||
if (ctr >> 2 == s_tls_sctr >> 2)
|
||||
{
|
||||
busy_wait(300);
|
||||
}
|
||||
else if (ctr >> 2 == s_tls_sctr >> 2)
|
||||
{
|
||||
g_suspend_counter.wait(ctr, -4);
|
||||
if (i < 20 || ctr & 1)
|
||||
{
|
||||
busy_wait(300);
|
||||
}
|
||||
else
|
||||
{
|
||||
g_suspend_counter.wait(ctr, -4);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user