Revert "Revert "Remove shared_cond and simplify reservation waiting""

This reverts commit b70c08a2e8.
This commit is contained in:
Nekotekina 2019-09-19 02:57:08 +03:00
parent 5ec35c7daa
commit feee3838eb
7 changed files with 3 additions and 349 deletions

View file

@ -2385,13 +2385,6 @@ s64 spu_thread::get_ch_value(u32 ch)
fmt::throw_exception("Not supported: event mask 0x%x" HERE, mask1);
}
const auto pseudo_lock = vm::reservation_notifier(raddr, 128).try_shared_lock();
if (!pseudo_lock)
{
fmt::throw_exception("Unexpected: reservation notifier lock failed");
}
while (res = get_events(), !res)
{
state += cpu_flag::wait;
@ -2401,7 +2394,7 @@ s64 spu_thread::get_ch_value(u32 ch)
return -1;
}
pseudo_lock.wait(100);
vm::reservation_notifier(raddr, 128).wait<UINT64_MAX & -128>(rtime, atomic_wait_timeout{100'000});
}
check_state();