From 81e74ebd8689ba7f7525e2da7bf814fccbe85ad0 Mon Sep 17 00:00:00 2001 From: gdkchan Date: Thu, 26 Apr 2018 00:07:12 -0300 Subject: [PATCH] Remove thread from the threads list when it finishes, remove debug code --- Ryujinx.Core/OsHle/Kernel/SvcThreadSync.cs | 2 -- Ryujinx.Core/OsHle/Process.cs | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Ryujinx.Core/OsHle/Kernel/SvcThreadSync.cs b/Ryujinx.Core/OsHle/Kernel/SvcThreadSync.cs index ec109b2d54..e382cf7597 100644 --- a/Ryujinx.Core/OsHle/Kernel/SvcThreadSync.cs +++ b/Ryujinx.Core/OsHle/Kernel/SvcThreadSync.cs @@ -43,8 +43,6 @@ namespace Ryujinx.Core.OsHle.Kernel KThread OwnerThread = Process.HandleTable.GetData(OwnerThreadHandle); - Ns.Log.PrintDebug(LogClass.KernelSvc, "lock tid: " + OwnerThread.ThreadId.ToString()); - if (OwnerThread == null) { Ns.Log.PrintWarning(LogClass.KernelSvc, $"Invalid owner thread handle 0x{OwnerThreadHandle:x8}!"); diff --git a/Ryujinx.Core/OsHle/Process.cs b/Ryujinx.Core/OsHle/Process.cs index c3f934af83..b8c088563f 100644 --- a/Ryujinx.Core/OsHle/Process.cs +++ b/Ryujinx.Core/OsHle/Process.cs @@ -345,7 +345,7 @@ namespace Ryujinx.Core.OsHle { TlsSlots.TryRemove(GetTlsSlot(Thread.ThreadState.Tpidr), out _); - KThread KernelThread = GetThread(Thread.ThreadState.Tpidr); + Threads.TryRemove(Thread.ThreadState.Tpidr, out KThread KernelThread); Scheduler.RemoveThread(KernelThread);