mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-20 11:36:13 +00:00
PPU/LLVM: Avoid recompiler thread spinning forever
This commit is contained in:
parent
53769ae1bd
commit
6e8a5f3a5f
1 changed files with 5 additions and 0 deletions
|
@ -559,8 +559,13 @@ void RecompilationEngine::CompileBlock(BlockEntry & block_entry) {
|
|||
|
||||
std::lock_guard<std::mutex> lock(m_address_locks[block_entry.cfg.start_address].first);
|
||||
|
||||
int loopiteration = 0;
|
||||
while (m_address_locks[block_entry.cfg.start_address].second.load() > 0)
|
||||
{
|
||||
std::this_thread::yield();
|
||||
if (loopiteration++ > 10000000)
|
||||
return;
|
||||
}
|
||||
|
||||
std::get<1>(m_address_to_function[block_entry.cfg.start_address]) = std::unique_ptr<llvm::ExecutionEngine>(compileResult.second);
|
||||
std::get<0>(m_address_to_function[block_entry.cfg.start_address]) = compileResult.first;
|
||||
|
|
Loading…
Add table
Reference in a new issue