mirror of
https://github.com/RPCSX/rpcsx.git
synced 2025-12-06 07:12:14 +01:00
vm.cpp/Non-TSX: Fixup potential deadlock
This commit is contained in:
parent
06c9b95e09
commit
9f625de51a
|
|
@ -391,14 +391,19 @@ namespace vm
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!get_range_lock_bits(true)) [[likely]]
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (i < 100)
|
if (i < 100)
|
||||||
busy_wait(200);
|
busy_wait(200);
|
||||||
else
|
else
|
||||||
std::this_thread::yield();
|
std::this_thread::yield();
|
||||||
|
|
||||||
if (!get_range_lock_bits(true)) [[likely]]
|
if (cpu_flag::wait - cpu.state)
|
||||||
{
|
{
|
||||||
return;
|
cpu.state += cpu_flag::wait;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue