From 929a97d432d98b4270a78cb668d543c23cc2836a Mon Sep 17 00:00:00 2001 From: Mary Date: Sun, 16 Jan 2022 13:21:44 +0100 Subject: [PATCH] kernel: Fix deadlock when pinning in interrupt handler (#2999) * kernel: Fix deadlock when pinning in interrupt handler This fix a deadlock on DoDonPachi Resurrection when starting a new game * Address gdkchan's comment --- Ryujinx.HLE/HOS/Kernel/Process/KProcess.cs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Ryujinx.HLE/HOS/Kernel/Process/KProcess.cs b/Ryujinx.HLE/HOS/Kernel/Process/KProcess.cs index 649cfb93fb..be45f02aa3 100644 --- a/Ryujinx.HLE/HOS/Kernel/Process/KProcess.cs +++ b/Ryujinx.HLE/HOS/Kernel/Process/KProcess.cs @@ -761,14 +761,10 @@ namespace Ryujinx.HLE.HOS.Kernel.Process currentThread.SetUserInterruptFlag(); - if (currentThread.IsSchedulable) - { - KernelContext.Schedulers[currentThread.CurrentCore].Schedule(); - } - KernelContext.CriticalSection.Leave(); } - else if (currentThread.IsSchedulable) + + if (currentThread.IsSchedulable) { KernelContext.Schedulers[currentThread.CurrentCore].Schedule(); }