mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-03 21:41:26 +12:00
Fix spu_thread::cleanup()
This commit is contained in:
parent
292d3faa9e
commit
16579e0b1f
2 changed files with 6 additions and 6 deletions
|
@ -1312,7 +1312,10 @@ bool cpu_thread::suspend_work::push(cpu_thread* _this) noexcept
|
|||
|
||||
void cpu_thread::cleanup() noexcept
|
||||
{
|
||||
ensure(!s_cpu_counter);
|
||||
if (u64 count = s_cpu_counter)
|
||||
{
|
||||
fmt::throw_exception("cpu_thread::cleanup(): %u threads are still active! (created=%u, destroyed=%u)", count, +g_threads_created, +g_threads_deleted);
|
||||
}
|
||||
|
||||
sys_log.notice("All CPU threads have been stopped. [+: %u]", +g_threads_created);
|
||||
|
||||
|
|
|
@ -1767,11 +1767,8 @@ void spu_thread::cleanup()
|
|||
// Free range lock (and signals cleanup was called to the destructor)
|
||||
vm::free_range_lock(range_lock);
|
||||
|
||||
// Signal the debugger about the termination
|
||||
if (!state.test_and_set(cpu_flag::exit))
|
||||
{
|
||||
state.notify_one();
|
||||
}
|
||||
// Terminate and join thread
|
||||
static_cast<named_thread<spu_thread>&>(*this) = thread_state::finished;
|
||||
}
|
||||
|
||||
spu_thread::~spu_thread()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue