mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-20 19:45:20 +00:00
TSX: workaround for check_state freezes
This commit is contained in:
parent
7b40859eff
commit
390b192f0a
1 changed files with 3 additions and 2 deletions
|
@ -757,7 +757,7 @@ bool cpu_thread::check_state() noexcept
|
|||
{
|
||||
u64 ctr = g_suspend_counter;
|
||||
|
||||
if (ctr >> 2 == s_tls_sctr >> 2)
|
||||
if (ctr >> 2 == s_tls_sctr >> 2 && state & cpu_flag::pause)
|
||||
{
|
||||
if (i < 20 || ctr & 1)
|
||||
{
|
||||
|
@ -765,7 +765,8 @@ bool cpu_thread::check_state() noexcept
|
|||
}
|
||||
else
|
||||
{
|
||||
g_suspend_counter.wait(ctr, -4);
|
||||
// TODO: fix the workaround
|
||||
g_suspend_counter.wait(ctr, -4, atomic_wait_timeout{100});
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Add table
Reference in a new issue