summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2023-11-14 18:23:04 +0100
committerGitHub <noreply@github.com>2023-11-14 18:23:04 +0100
commitdf0d3698ae8f57f70a4502c79973a9ee88397f97 (patch)
tree77e875f338f4a35e345124a8119a466420c5d747
parentMerge pull request #12019 from liamwhite/more-shutdown-deadlocks (diff)
parentcore: check for thread dpc before eret (diff)
downloadyuzu-df0d3698ae8f57f70a4502c79973a9ee88397f97.tar
yuzu-df0d3698ae8f57f70a4502c79973a9ee88397f97.tar.gz
yuzu-df0d3698ae8f57f70a4502c79973a9ee88397f97.tar.bz2
yuzu-df0d3698ae8f57f70a4502c79973a9ee88397f97.tar.lz
yuzu-df0d3698ae8f57f70a4502c79973a9ee88397f97.tar.xz
yuzu-df0d3698ae8f57f70a4502c79973a9ee88397f97.tar.zst
yuzu-df0d3698ae8f57f70a4502c79973a9ee88397f97.zip
-rw-r--r--src/core/arm/arm_interface.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/core/arm/arm_interface.cpp b/src/core/arm/arm_interface.cpp
index 5e27dde58..558fba5bd 100644
--- a/src/core/arm/arm_interface.cpp
+++ b/src/core/arm/arm_interface.cpp
@@ -153,6 +153,14 @@ void ARM_Interface::Run() {
Kernel::KThread* current_thread{Kernel::GetCurrentThreadPointer(system.Kernel())};
HaltReason hr{};
+ // If the thread is scheduled for termination, exit the thread.
+ if (current_thread->HasDpc()) {
+ if (current_thread->IsTerminationRequested()) {
+ current_thread->Exit();
+ UNREACHABLE();
+ }
+ }
+
// Notify the debugger and go to sleep if a step was performed
// and this thread has been scheduled again.
if (current_thread->GetStepState() == StepState::StepPerformed) {
@@ -174,14 +182,6 @@ void ARM_Interface::Run() {
}
system.ExitCPUProfile();
- // If the thread is scheduled for termination, exit the thread.
- if (current_thread->HasDpc()) {
- if (current_thread->IsTerminationRequested()) {
- current_thread->Exit();
- UNREACHABLE();
- }
- }
-
// Notify the debugger and go to sleep if a breakpoint was hit,
// or if the thread is unable to continue for any reason.
if (True(hr & HaltReason::InstructionBreakpoint) || True(hr & HaltReason::PrefetchAbort)) {