mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-06 23:11:25 +12:00
Improve Stop Watchdog
Prevent termination if PPU LLVM compilation is in progress.
This commit is contained in:
parent
2d2ed7efd0
commit
938ca90a02
2 changed files with 16 additions and 1 deletions
|
@ -66,6 +66,8 @@ const bool s_use_ssse3 = utils::has_ssse3();
|
|||
|
||||
extern u64 get_guest_system_time();
|
||||
|
||||
extern atomic_t<u64> g_watchdog_hold_ctr;
|
||||
|
||||
extern atomic_t<const char*> g_progr;
|
||||
extern atomic_t<u32> g_progr_ptotal;
|
||||
extern atomic_t<u32> g_progr_pdone;
|
||||
|
@ -1678,6 +1680,9 @@ extern void ppu_initialize(const ppu_module& info)
|
|||
atomic_t<u64> index = 0;
|
||||
};
|
||||
|
||||
// Prevent watchdog thread from terminating
|
||||
g_watchdog_hold_ctr++;
|
||||
|
||||
named_thread_group threads(fmt::format("PPUW.%u.", ++g_fxo->get<thread_index_allocator>()->index), thread_count, [&]()
|
||||
{
|
||||
// Set low priority
|
||||
|
@ -1708,6 +1713,8 @@ extern void ppu_initialize(const ppu_module& info)
|
|||
|
||||
threads.join();
|
||||
|
||||
g_watchdog_hold_ctr--;
|
||||
|
||||
if (Emu.IsStopped() || !get_current_cpu_thread())
|
||||
{
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue