mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-06 23:11:25 +12:00
Revert "Remove shared_cond
and simplify reservation waiting"
This reverts commit 0a96497e13
.
This commit is contained in:
parent
c9170bbb88
commit
b70c08a2e8
7 changed files with 349 additions and 3 deletions
|
@ -2385,6 +2385,13 @@ 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;
|
||||
|
@ -2394,7 +2401,7 @@ s64 spu_thread::get_ch_value(u32 ch)
|
|||
return -1;
|
||||
}
|
||||
|
||||
vm::reservation_notifier(raddr, 128).wait<UINT64_MAX & -128>(rtime, atomic_wait_timeout{30000});
|
||||
pseudo_lock.wait(100);
|
||||
}
|
||||
|
||||
check_state();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue