Address gdk's comments

This commit is contained in:
Thog 2019-12-24 13:19:24 +01:00
commit 68d1599a39
No known key found for this signature in database
GPG key ID: 0CD291558FAFDBC6
2 changed files with 4 additions and 2 deletions

View file

@ -998,6 +998,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Process
lock (_threadingLock) lock (_threadingLock)
{ {
System.CriticalSection.Enter(); System.CriticalSection.Enter();
foreach (KThread thread in _threads) foreach (KThread thread in _threads)
{ {
if ((thread.SchedFlags & ThreadSchedState.LowMask) != ThreadSchedState.TerminationPending) if ((thread.SchedFlags & ThreadSchedState.LowMask) != ThreadSchedState.TerminationPending)
@ -1005,6 +1006,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Process
thread.PrepareForTermination(); thread.PrepareForTermination();
} }
} }
System.CriticalSection.Leave(); System.CriticalSection.Leave();
} }

View file

@ -31,10 +31,10 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
svcFunc(this, context); svcFunc(this, context);
PostSvcHandler(context); PostSvcHandler();
} }
private void PostSvcHandler(ExecutionContext context) private void PostSvcHandler()
{ {
KThread currentThread = _system.Scheduler.GetCurrentThread(); KThread currentThread = _system.Scheduler.GetCurrentThread();