mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-05 14:31:24 +12:00
CPU preemption control: bugfixes
This commit is contained in:
parent
9d1ec0b319
commit
cf4da5c4d1
3 changed files with 41 additions and 12 deletions
|
@ -654,7 +654,7 @@ bool cpu_thread::check_state() noexcept
|
|||
{
|
||||
// Process all flags in a single atomic op
|
||||
bs_t<cpu_flag> state1;
|
||||
const auto state0 = state.fetch_op([&](bs_t<cpu_flag>& flags)
|
||||
auto state0 = state.fetch_op([&](bs_t<cpu_flag>& flags)
|
||||
{
|
||||
bool store = false;
|
||||
|
||||
|
@ -784,7 +784,8 @@ bool cpu_thread::check_state() noexcept
|
|||
if (cpu_flag::wait - state0)
|
||||
{
|
||||
// Yield itself
|
||||
s_dummy_atomic.wait(0, 1u << 30, atomic_wait_timeout{80'000});
|
||||
escape = false;
|
||||
state0 += cpu_flag::yield;
|
||||
}
|
||||
|
||||
if (const u128 bits = s_cpu_bits)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue