aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/k_interrupt_manager.cpp
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2022-06-26 18:52:16 -0400
committerLiam <byteslice@airmail.cc>2022-07-14 22:47:18 -0400
commit0624c880bd5af45ae9095465e079fa55458515f6 (patch)
treea8b9f3adf516af30cad021fc32f8669426946cd5 /src/core/hle/kernel/k_interrupt_manager.cpp
parent53fb4a78a3ab73b4233464b74be5fcf53b0424d0 (diff)
kernel: use KScheduler from mesosphere
Diffstat (limited to 'src/core/hle/kernel/k_interrupt_manager.cpp')
-rw-r--r--src/core/hle/kernel/k_interrupt_manager.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/hle/kernel/k_interrupt_manager.cpp b/src/core/hle/kernel/k_interrupt_manager.cpp
index d606a7f86..1b577a5b3 100644
--- a/src/core/hle/kernel/k_interrupt_manager.cpp
+++ b/src/core/hle/kernel/k_interrupt_manager.cpp
@@ -6,6 +6,7 @@
#include "core/hle/kernel/k_scheduler.h"
#include "core/hle/kernel/k_thread.h"
#include "core/hle/kernel/kernel.h"
+#include "core/hle/kernel/physical_core.h"
namespace Kernel::KInterruptManager {
@@ -15,6 +16,9 @@ void HandleInterrupt(KernelCore& kernel, s32 core_id) {
return;
}
+ // Acknowledge the interrupt.
+ kernel.PhysicalCore(core_id).ClearInterrupt();
+
auto& current_thread = GetCurrentThread(kernel);
// If the user disable count is set, we may need to pin the current thread.
@@ -27,6 +31,9 @@ void HandleInterrupt(KernelCore& kernel, s32 core_id) {
// Set the interrupt flag for the thread.
GetCurrentThread(kernel).SetInterruptFlag();
}
+
+ // Request interrupt scheduling.
+ kernel.CurrentScheduler()->RequestScheduleOnInterrupt();
}
} // namespace Kernel::KInterruptManager