mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-04 22:11:26 +12:00
Fix vm::reservation_update
This commit is contained in:
parent
3fa8994f4e
commit
6535d461be
1 changed files with 12 additions and 5 deletions
|
@ -101,6 +101,13 @@ namespace vm
|
||||||
u64 old = -1;
|
u64 old = -1;
|
||||||
const auto cpu = get_current_cpu_thread();
|
const auto cpu = get_current_cpu_thread();
|
||||||
|
|
||||||
|
const bool had_wait = cpu && cpu->state & cpu_flag::wait;
|
||||||
|
|
||||||
|
if (cpu && !had_wait)
|
||||||
|
{
|
||||||
|
cpu->state += cpu_flag::wait;
|
||||||
|
}
|
||||||
|
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
const auto [ok, rtime] = try_reservation_update(addr);
|
const auto [ok, rtime] = try_reservation_update(addr);
|
||||||
|
@ -112,15 +119,15 @@ namespace vm
|
||||||
reservation_notifier(addr).notify_all();
|
reservation_notifier(addr).notify_all();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (cpu && !had_wait && cpu->test_stopped())
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
old = rtime;
|
old = rtime;
|
||||||
|
|
||||||
if (cpu && cpu->test_stopped())
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue