mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-02-06 00:40:11 +00:00
CPU: remove descheduled threads from suspend_all list
This commit is contained in:
parent
85880ffded
commit
5bcaa25c02
@ -1115,9 +1115,15 @@ DECLARE(lv2_obj::g_waiting);
|
|||||||
|
|
||||||
thread_local DECLARE(lv2_obj::g_to_awake);
|
thread_local DECLARE(lv2_obj::g_to_awake);
|
||||||
|
|
||||||
|
namespace cpu_counter
|
||||||
|
{
|
||||||
|
void remove(cpu_thread*) noexcept;
|
||||||
|
}
|
||||||
|
|
||||||
void lv2_obj::sleep(cpu_thread& cpu, const u64 timeout)
|
void lv2_obj::sleep(cpu_thread& cpu, const u64 timeout)
|
||||||
{
|
{
|
||||||
vm::temporary_unlock(cpu);
|
vm::temporary_unlock(cpu);
|
||||||
|
cpu_counter::remove(&cpu);
|
||||||
std::lock_guard{g_mutex}, sleep_unlocked(cpu, timeout);
|
std::lock_guard{g_mutex}, sleep_unlocked(cpu, timeout);
|
||||||
g_to_awake.clear();
|
g_to_awake.clear();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user