Merge pull request #12620 from mitaclaw/jit-interface-cpu-thread-guard

JitInterface::ClearCache: Modernize With CPUThreadGuard
This commit is contained in:
Admiral H. Curtiss
2024-03-22 04:17:33 +01:00
committed by GitHub
6 changed files with 52 additions and 53 deletions

View File

@ -1006,18 +1006,17 @@ void UpdateWantDeterminism(Core::System& system, bool initial)
{
NOTICE_LOG_FMT(COMMON, "Want determinism <- {}", new_want_determinism ? "true" : "false");
RunAsCPUThread([&] {
s_wants_determinism = new_want_determinism;
const auto ios = system.GetIOS();
if (ios)
ios->UpdateWantDeterminism(new_want_determinism);
const Core::CPUThreadGuard guard(system);
s_wants_determinism = new_want_determinism;
const auto ios = system.GetIOS();
if (ios)
ios->UpdateWantDeterminism(new_want_determinism);
system.GetFifo().UpdateWantDeterminism(new_want_determinism);
system.GetFifo().UpdateWantDeterminism(new_want_determinism);
// We need to clear the cache because some parts of the JIT depend on want_determinism,
// e.g. use of FMA.
system.GetJitInterface().ClearCache();
});
// We need to clear the cache because some parts of the JIT depend on want_determinism,
// e.g. use of FMA.
system.GetJitInterface().ClearCache(guard);
}
}