diff options
author | gdkchan <gab.dark.100@gmail.com> | 2020-05-04 00:41:29 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-04 13:41:29 +1000 |
commit | 15d1cc806b1b978bab83d8bb426a124d9f0f788c (patch) | |
tree | 4fd10fdd11412bafcf3022e7cc4eb21179eef1b1 /Ryujinx.HLE/HOS/Kernel/Threading/KConditionVariable.cs | |
parent | cd48576f5846aa89a36bfc833e9de5dde9627aed (diff) |
Move kernel state out of the Horizon class (#1107)
* Move kernel state from Horizon to KernelContext
* Merge syscalls partial classes, split 32 and 64-bit variants
* Sort usings
Diffstat (limited to 'Ryujinx.HLE/HOS/Kernel/Threading/KConditionVariable.cs')
-rw-r--r-- | Ryujinx.HLE/HOS/Kernel/Threading/KConditionVariable.cs | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/Ryujinx.HLE/HOS/Kernel/Threading/KConditionVariable.cs b/Ryujinx.HLE/HOS/Kernel/Threading/KConditionVariable.cs index 41473643..dd7e67ae 100644 --- a/Ryujinx.HLE/HOS/Kernel/Threading/KConditionVariable.cs +++ b/Ryujinx.HLE/HOS/Kernel/Threading/KConditionVariable.cs @@ -5,11 +5,11 @@ namespace Ryujinx.HLE.HOS.Kernel.Threading { static class KConditionVariable { - public static void Wait(Horizon system, LinkedList<KThread> threadList, object mutex, long timeout) + public static void Wait(KernelContext context, LinkedList<KThread> threadList, object mutex, long timeout) { - KThread currentThread = system.Scheduler.GetCurrentThread(); + KThread currentThread = context.Scheduler.GetCurrentThread(); - system.CriticalSection.Enter(); + context.CriticalSection.Enter(); Monitor.Exit(mutex); @@ -28,29 +28,29 @@ namespace Ryujinx.HLE.HOS.Kernel.Threading currentThread.Withholder = null; - system.CriticalSection.Leave(); + context.CriticalSection.Leave(); } else { if (timeout > 0) { - system.TimeManager.ScheduleFutureInvocation(currentThread, timeout); + context.TimeManager.ScheduleFutureInvocation(currentThread, timeout); } - system.CriticalSection.Leave(); + context.CriticalSection.Leave(); if (timeout > 0) { - system.TimeManager.UnscheduleFutureInvocation(currentThread); + context.TimeManager.UnscheduleFutureInvocation(currentThread); } } Monitor.Enter(mutex); } - public static void NotifyAll(Horizon system, LinkedList<KThread> threadList) + public static void NotifyAll(KernelContext context, LinkedList<KThread> threadList) { - system.CriticalSection.Enter(); + context.CriticalSection.Enter(); LinkedListNode<KThread> node = threadList.First; @@ -65,7 +65,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Threading thread.Reschedule(ThreadSchedState.Running); } - system.CriticalSection.Leave(); + context.CriticalSection.Leave(); } } }
\ No newline at end of file |