diff options
| author | bunnei <bunneidev@gmail.com> | 2022-09-05 18:19:30 -0700 |
|---|---|---|
| committer | bunnei <bunneidev@gmail.com> | 2022-10-18 19:13:34 -0700 |
| commit | 97e4cd1c8f5576cf5615c22e6cbbb5526000762d (patch) | |
| tree | fda85e063fac9e098ebd7848d8de2ae3ef6b7e45 /src/core/arm/arm_interface.cpp | |
| parent | 0592bf30c193d624fb3b7b3b9db5fc572e47cf91 (diff) | |
core: hle: kernel: k_thread: Implement thread termination DPC.
Diffstat (limited to 'src/core/arm/arm_interface.cpp')
| -rw-r--r-- | src/core/arm/arm_interface.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/core/arm/arm_interface.cpp b/src/core/arm/arm_interface.cpp index 953d964399..29ba562dce 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)) { |
