Fix the kill command, improve stepping

This commit is contained in:
svc64 2023-12-09 15:09:56 +02:00
parent 055ac70eaa
commit 13c53657cc
2 changed files with 4 additions and 4 deletions

View file

@ -1247,10 +1247,10 @@ namespace Ryujinx.HLE.HOS.Kernel.Process
return false; return false;
} }
_parent.KernelContext.CriticalSection.Enter(); _parent.KernelContext.CriticalSection.Enter();
bool wasPaused = (target.SchedFlags & ThreadSchedState.LowMask) == ThreadSchedState.Paused; bool waiting = target.MutexOwner != null || target.WaitingSync || target.WaitingInArbitration;
target.Context.RequestDebugStep(); target.Context.RequestDebugStep();
target.Resume(ThreadSchedState.ThreadPauseFlag); target.Resume(ThreadSchedState.ThreadPauseFlag);
if (wasPaused) if (waiting)
{ {
lock (_parent._threadingLock) lock (_parent._threadingLock)
{ {
@ -1267,7 +1267,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Process
_parent.KernelContext.CriticalSection.Enter(); _parent.KernelContext.CriticalSection.Enter();
target.Suspend(ThreadSchedState.ThreadPauseFlag); target.Suspend(ThreadSchedState.ThreadPauseFlag);
if (wasPaused) if (waiting)
{ {
lock (_parent._threadingLock) lock (_parent._threadingLock)
{ {

View file

@ -161,8 +161,8 @@ namespace Ryujinx.HLE
AudioDeviceDriver.Dispose(); AudioDeviceDriver.Dispose();
FileSystem.Dispose(); FileSystem.Dispose();
Memory.Dispose(); Memory.Dispose();
Debugger.Dispose();
ExitStatus.Set(); ExitStatus.Set();
Debugger.Dispose();
} }
} }
} }