From 15d1cc806b1b978bab83d8bb426a124d9f0f788c Mon Sep 17 00:00:00 2001
From: gdkchan <gab.dark.100@gmail.com>
Date: Mon, 4 May 2020 00:41:29 -0300
Subject: 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
---
 .../HOS/Kernel/Threading/KConditionVariable.cs       | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

(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 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
-- 
cgit v1.2.3-70-g09d2