summaryrefslogtreecommitdiffstats
path: root/src/core/arm
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2022-09-06 03:19:30 +0200
committerbunnei <bunneidev@gmail.com>2022-10-19 04:13:34 +0200
commit57a77e9ff4b4a63c106c0ac3448a8f1452b5384c (patch)
treefda85e063fac9e098ebd7848d8de2ae3ef6b7e45 /src/core/arm
parentcore: hle: kernel: Add KDynamicResourceManager. (diff)
downloadyuzu-57a77e9ff4b4a63c106c0ac3448a8f1452b5384c.tar
yuzu-57a77e9ff4b4a63c106c0ac3448a8f1452b5384c.tar.gz
yuzu-57a77e9ff4b4a63c106c0ac3448a8f1452b5384c.tar.bz2
yuzu-57a77e9ff4b4a63c106c0ac3448a8f1452b5384c.tar.lz
yuzu-57a77e9ff4b4a63c106c0ac3448a8f1452b5384c.tar.xz
yuzu-57a77e9ff4b4a63c106c0ac3448a8f1452b5384c.tar.zst
yuzu-57a77e9ff4b4a63c106c0ac3448a8f1452b5384c.zip
Diffstat (limited to 'src/core/arm')
-rw-r--r--src/core/arm/arm_interface.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/core/arm/arm_interface.cpp b/src/core/arm/arm_interface.cpp
index 953d96439..29ba562dc 100644
--- a/src/core/arm/arm_interface.cpp
+++ b/src/core/arm/arm_interface.cpp
@@ -134,6 +134,14 @@ void ARM_Interface::Run() {
}
system.ExitDynarmicProfile();
+ // 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 (Has(hr, breakpoint) || Has(hr, no_execute)) {