aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/physical_core.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/kernel/physical_core.cpp')
-rw-r--r--src/core/hle/kernel/physical_core.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/core/hle/kernel/physical_core.cpp b/src/core/hle/kernel/physical_core.cpp
index f394122764..a81c14f643 100644
--- a/src/core/hle/kernel/physical_core.cpp
+++ b/src/core/hle/kernel/physical_core.cpp
@@ -17,14 +17,15 @@
namespace Kernel {
PhysicalCore::PhysicalCore(KernelCore& kernel, std::size_t core_index)
- : m_kernel{kernel}, m_core_index{core_index} {
+ : m_core_index{core_index}
+{
m_is_single_core = !kernel.IsMulticore();
}
PhysicalCore::~PhysicalCore() = default;
-void PhysicalCore::RunThread(Kernel::KThread* thread) {
+void PhysicalCore::RunThread(KernelCore& kernel, Kernel::KThread* thread) {
auto* process = thread->GetOwnerProcess();
- auto& system = m_kernel.System();
+ auto& system = kernel.System();
auto* interface = process->GetArmInterface(m_core_index);
interface->Initialize();
@@ -72,14 +73,14 @@ void PhysicalCore::RunThread(Kernel::KThread* thread) {
while (true) {
// If the thread is scheduled for termination, exit.
if (thread->HasDpc() && thread->IsTerminationRequested()) {
- thread->Exit();
+ thread->Exit(kernel);
}
// Notify the debugger and go to sleep if a step was performed
// and this thread has been scheduled again.
if (thread->GetStepState() == StepState::StepPerformed) {
system.GetDebugger().NotifyThreadStopped(thread);
- thread->RequestSuspend(SuspendType::Debug);
+ thread->RequestSuspend(kernel, SuspendType::Debug);
return;
}
@@ -135,7 +136,7 @@ void PhysicalCore::RunThread(Kernel::KThread* thread) {
} else {
interface->LogBacktrace(process);
}
- thread->RequestSuspend(SuspendType::Debug);
+ thread->RequestSuspend(kernel, SuspendType::Debug);
return;
}
@@ -144,7 +145,7 @@ void PhysicalCore::RunThread(Kernel::KThread* thread) {
if (system.DebuggerEnabled()) {
system.GetDebugger().NotifyThreadWatchpoint(thread, *interface->HaltedWatchpoint());
}
- thread->RequestSuspend(SuspendType::Debug);
+ thread->RequestSuspend(kernel, SuspendType::Debug);
return;
}
@@ -208,8 +209,8 @@ void PhysicalCore::CloneFpuStatus(KThread* dst) const {
dst->GetContext().fpsr = ctx.fpsr;
}
-void PhysicalCore::LogBacktrace() {
- auto* process = GetCurrentProcessPointer(m_kernel);
+void PhysicalCore::LogBacktrace(KernelCore& kernel) {
+ auto* process = GetCurrentProcessPointer(kernel);
if (!process) {
return;
}