Core: when scheduling an invalidate cpu cache, no need to schedule if we're already on the cpu thread

This commit is contained in:
iwubcode 2022-12-22 19:43:24 -06:00
parent 2f2f906bf5
commit 3081a781fd
1 changed files with 1 additions and 1 deletions

View File

@ -283,7 +283,7 @@ void Reset()
void ScheduleInvalidateCacheThreadSafe(u32 address)
{
if (CPU::GetState() == CPU::State::Running)
if (CPU::GetState() == CPU::State::Running && !Core::IsCPUThread())
{
Core::System::GetInstance().GetCoreTiming().ScheduleEvent(
0, s_invalidate_cache_thread_safe, address, CoreTiming::FromThread::NON_CPU);