From 48278905d1470f89be31668c738397f569af156a Mon Sep 17 00:00:00 2001 From: gdkchan <gab.dark.100@gmail.com> Date: Wed, 9 Dec 2020 19:20:05 -0300 Subject: Rewrite scheduler context switch code (#1786) * Rewrite scheduler context switch code * Fix race in UnmapIpcRestorePermission * Fix thread exit issue that could leave the scheduler in a invalid state * Change context switch method to not wait on guest thread, remove spin wait, use SignalAndWait to pass control * Remove multi-core setting (it is always on now) * Re-enable assert * Remove multicore from default config and schema * Fix race in KTimeManager --- Ryujinx.HLE/HOS/Kernel/Threading/KConditionVariable.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Ryujinx.HLE/HOS/Kernel/Threading/KConditionVariable.cs') diff --git a/Ryujinx.HLE/HOS/Kernel/Threading/KConditionVariable.cs b/Ryujinx.HLE/HOS/Kernel/Threading/KConditionVariable.cs index dd7e67ae..d146bff0 100644 --- a/Ryujinx.HLE/HOS/Kernel/Threading/KConditionVariable.cs +++ b/Ryujinx.HLE/HOS/Kernel/Threading/KConditionVariable.cs @@ -7,7 +7,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Threading { public static void Wait(KernelContext context, LinkedList<KThread> threadList, object mutex, long timeout) { - KThread currentThread = context.Scheduler.GetCurrentThread(); + KThread currentThread = KernelStatic.GetCurrentThread(); context.CriticalSection.Enter(); -- cgit v1.2.3-70-g09d2