From 3081a781fd172d681a60d89c357aa20b2b76556d Mon Sep 17 00:00:00 2001 From: iwubcode Date: Thu, 22 Dec 2022 19:43:24 -0600 Subject: [PATCH] Core: when scheduling an invalidate cpu cache, no need to schedule if we're already on the cpu thread --- Source/Core/Core/PowerPC/PowerPC.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/Core/PowerPC/PowerPC.cpp b/Source/Core/Core/PowerPC/PowerPC.cpp index eafa547e92..9b2bcafd40 100644 --- a/Source/Core/Core/PowerPC/PowerPC.cpp +++ b/Source/Core/Core/PowerPC/PowerPC.cpp @@ -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);