Add missing check for thread termination on ArbitrateLock (#4722)

* Add missing check for thread termination on ArbitrateLock

* Use TerminationRequested in all places where it can be used
This commit is contained in:
gdkchan 2023-04-25 19:33:14 -03:00 committed by GitHub
parent db4242c5dc
commit 097562bc6c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 19 additions and 23 deletions

View file

@ -188,8 +188,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Ipc
if (request.AsyncEvent == null)
{
if (request.ClientThread.ShallBeTerminated ||
request.ClientThread.SchedFlags == ThreadSchedState.TerminationPending)
if (request.ClientThread.TerminationRequested)
{
return KernelResult.ThreadTerminating;
}
@ -1104,8 +1103,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Ipc
{
foreach (KSessionRequest request in IterateWithRemovalOfAllRequests())
{
if (request.ClientThread.ShallBeTerminated ||
request.ClientThread.SchedFlags == ThreadSchedState.TerminationPending)
if (request.ClientThread.TerminationRequested)
{
continue;
}