Skip to content

Commit

Permalink
Update PPUThread.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
elad335 committed Jun 26, 2023
1 parent 351dceb commit 6ac2dce
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions rpcs3/Emu/Cell/PPUThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3991,18 +3991,21 @@ bool ppu_initialize(const ppu_module& info, bool check_only)
}
};

// Lock unlock
g_fxo->get<jit_core_allocator>().sem.lock();
g_fxo->get<jit_core_allocator>().sem.unlock();
if (thread_count > 1)
{
// Lock unlock
g_fxo->get<jit_core_allocator>().sem.lock();
g_fxo->get<jit_core_allocator>().sem.unlock();

named_thread_group threads(fmt::format("PPUW.%u.", ++g_fxo->get<thread_index_allocator>().index), std::max<u32>(thread_count, 2) - 1, compile_func);
named_thread_group threads(fmt::format("PPUW.%u.", ++g_fxo->get<thread_index_allocator>().index), thread_count - 1, compile_func);
compile_func();

if (thread_count > 1)
threads.join();
}
else
{
compile_func();
}

threads.join();
}

g_watchdog_hold_ctr--;
Expand Down

0 comments on commit 6ac2dce

Please sign in to comment.