diff options
Diffstat (limited to 'Ryujinx.HLE/HOS/Kernel/SupervisorCall/SyscallHandler.cs')
-rw-r--r-- | Ryujinx.HLE/HOS/Kernel/SupervisorCall/SyscallHandler.cs | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/Ryujinx.HLE/HOS/Kernel/SupervisorCall/SyscallHandler.cs b/Ryujinx.HLE/HOS/Kernel/SupervisorCall/SyscallHandler.cs index b4e7a0bf..5e795d35 100644 --- a/Ryujinx.HLE/HOS/Kernel/SupervisorCall/SyscallHandler.cs +++ b/Ryujinx.HLE/HOS/Kernel/SupervisorCall/SyscallHandler.cs @@ -19,7 +19,22 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall public void SvcCall(object sender, InstExceptionEventArgs e) { - ExecutionContext context = (ExecutionContext)sender; + KThread currentThread = KernelStatic.GetCurrentThread(); + + if (currentThread.Owner != null && + currentThread.GetUserDisableCount() != 0 && + currentThread.Owner.PinnedThreads[currentThread.CurrentCore] == null) + { + _context.CriticalSection.Enter(); + + currentThread.Owner.PinThread(currentThread); + + currentThread.SetUserInterruptFlag(); + + _context.CriticalSection.Leave(); + } + + ExecutionContext context = (ExecutionContext)sender; if (context.IsAarch32) { @@ -44,13 +59,6 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall svcFunc(_syscall64, context); } - PostSvcHandler(); - } - - private void PostSvcHandler() - { - KThread currentThread = KernelStatic.GetCurrentThread(); - currentThread.HandlePostSyscall(); } } |