diff options
author | bunnei <bunneidev@gmail.com> | 2020-01-31 17:13:24 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-31 17:13:24 +0100 |
commit | c18f9898d9d155504e8d608238db9a9d12a743c6 (patch) | |
tree | 7337c2c0dd81147f02838de2160f801aec74bd48 /src | |
parent | Merge pull request #3363 from lioncash/unique_ptr (diff) | |
parent | core/arm: Remove usage of global GetCurrentThread() (diff) | |
download | yuzu-c18f9898d9d155504e8d608238db9a9d12a743c6.tar yuzu-c18f9898d9d155504e8d608238db9a9d12a743c6.tar.gz yuzu-c18f9898d9d155504e8d608238db9a9d12a743c6.tar.bz2 yuzu-c18f9898d9d155504e8d608238db9a9d12a743c6.tar.lz yuzu-c18f9898d9d155504e8d608238db9a9d12a743c6.tar.xz yuzu-c18f9898d9d155504e8d608238db9a9d12a743c6.tar.zst yuzu-c18f9898d9d155504e8d608238db9a9d12a743c6.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/core/arm/dynarmic/arm_dynarmic.cpp | 3 | ||||
-rw-r--r-- | src/core/arm/unicorn/arm_unicorn.cpp | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/core/arm/dynarmic/arm_dynarmic.cpp b/src/core/arm/dynarmic/arm_dynarmic.cpp index f468e57e4..791640a3a 100644 --- a/src/core/arm/dynarmic/arm_dynarmic.cpp +++ b/src/core/arm/dynarmic/arm_dynarmic.cpp @@ -15,6 +15,7 @@ #include "core/core_timing_util.h" #include "core/gdbstub/gdbstub.h" #include "core/hle/kernel/process.h" +#include "core/hle/kernel/scheduler.h" #include "core/hle/kernel/svc.h" #include "core/hle/kernel/vm_manager.h" #include "core/memory.h" @@ -87,7 +88,7 @@ public: if (GDBStub::IsServerEnabled()) { parent.jit->HaltExecution(); parent.SetPC(pc); - Kernel::Thread* thread = Kernel::GetCurrentThread(); + Kernel::Thread* const thread = parent.system.CurrentScheduler().GetCurrentThread(); parent.SaveContext(thread->GetContext()); GDBStub::Break(); GDBStub::SendTrap(thread, 5); diff --git a/src/core/arm/unicorn/arm_unicorn.cpp b/src/core/arm/unicorn/arm_unicorn.cpp index 48182c99a..f99ad5802 100644 --- a/src/core/arm/unicorn/arm_unicorn.cpp +++ b/src/core/arm/unicorn/arm_unicorn.cpp @@ -9,6 +9,7 @@ #include "core/arm/unicorn/arm_unicorn.h" #include "core/core.h" #include "core/core_timing.h" +#include "core/hle/kernel/scheduler.h" #include "core/hle/kernel/svc.h" namespace Core { @@ -177,7 +178,7 @@ void ARM_Unicorn::ExecuteInstructions(std::size_t num_instructions) { uc_reg_write(uc, UC_ARM64_REG_PC, &last_bkpt.address); } - Kernel::Thread* thread = Kernel::GetCurrentThread(); + Kernel::Thread* const thread = system.CurrentScheduler().GetCurrentThread(); SaveContext(thread->GetContext()); if (last_bkpt_hit || GDBStub::IsMemoryBreak() || GDBStub::GetCpuStepFlag()) { last_bkpt_hit = false; |