mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-21 03:55:32 +00:00
CPU: Fix g_suspend_counter waiting logic
This commit is contained in:
parent
28cbba5a7d
commit
190676c982
1 changed files with 9 additions and 6 deletions
|
@ -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…
Add table
Reference in a new issue