aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Core/OsHle/Handles
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2018-04-19 00:19:22 -0300
committergdkchan <gab.dark.100@gmail.com>2018-04-19 00:19:22 -0300
commit6e69cd9284c0ba4bb25560f83dcea298169bdf7b (patch)
tree34e91940bedc4a55f95cda8e1c18b9dab55d29ed /Ryujinx.Core/OsHle/Handles
parentac80e7d3f90496d5f16f53afed888cd854fe6975 (diff)
Fix bad merge, and a few other fixes
Diffstat (limited to 'Ryujinx.Core/OsHle/Handles')
-rw-r--r--Ryujinx.Core/OsHle/Handles/KProcessScheduler.cs10
1 files changed, 10 insertions, 0 deletions
diff --git a/Ryujinx.Core/OsHle/Handles/KProcessScheduler.cs b/Ryujinx.Core/OsHle/Handles/KProcessScheduler.cs
index 238febd0..7cdf5f9c 100644
--- a/Ryujinx.Core/OsHle/Handles/KProcessScheduler.cs
+++ b/Ryujinx.Core/OsHle/Handles/KProcessScheduler.cs
@@ -95,6 +95,11 @@ namespace Ryujinx.Core.OsHle.Handles
return Threads.Contains(SchedThread);
}
}
+
+ public bool Remove(SchedulerThread SchedThread)
+ {
+ return Threads.Remove(SchedThread);
+ }
}
private ConcurrentDictionary<KThread, SchedulerThread> AllThreads;
@@ -153,6 +158,11 @@ namespace Ryujinx.Core.OsHle.Handles
lock (SchedLock)
{
+ if (AllThreads.TryRemove(Thread, out SchedulerThread SchedThread))
+ {
+ WaitingToRun[Thread.ProcessorId].Remove(SchedThread);
+ }
+
SchedulerThread NewThread = WaitingToRun[Thread.ProcessorId].Pop();
if (NewThread == null)