diff options
author | Lioncash <mathew1800@gmail.com> | 2019-03-13 00:03:26 +0100 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2019-03-13 00:03:28 +0100 |
commit | 6eddb60db0173acccb69f6b24c2f64fa0526a7c4 (patch) | |
tree | 8aa73fb88a439365093f0ab1e5cf485a0d45d869 /src/core/hle/kernel/process.cpp | |
parent | Merge pull request #2211 from lioncash/arbiter (diff) | |
download | yuzu-6eddb60db0173acccb69f6b24c2f64fa0526a7c4.tar yuzu-6eddb60db0173acccb69f6b24c2f64fa0526a7c4.tar.gz yuzu-6eddb60db0173acccb69f6b24c2f64fa0526a7c4.tar.bz2 yuzu-6eddb60db0173acccb69f6b24c2f64fa0526a7c4.tar.lz yuzu-6eddb60db0173acccb69f6b24c2f64fa0526a7c4.tar.xz yuzu-6eddb60db0173acccb69f6b24c2f64fa0526a7c4.tar.zst yuzu-6eddb60db0173acccb69f6b24c2f64fa0526a7c4.zip |
Diffstat (limited to 'src/core/hle/kernel/process.cpp')
-rw-r--r-- | src/core/hle/kernel/process.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/core/hle/kernel/process.cpp b/src/core/hle/kernel/process.cpp index 7e8ba978c..49fced7b1 100644 --- a/src/core/hle/kernel/process.cpp +++ b/src/core/hle/kernel/process.cpp @@ -133,7 +133,7 @@ void Process::PrepareForTermination() { if (thread->GetOwnerProcess() != this) continue; - if (thread == GetCurrentThread()) + if (thread == system.CurrentScheduler().GetCurrentThread()) continue; // TODO(Subv): When are the other running/ready threads terminated? @@ -145,7 +145,6 @@ void Process::PrepareForTermination() { } }; - const auto& system = Core::System::GetInstance(); stop_threads(system.Scheduler(0).GetThreadList()); stop_threads(system.Scheduler(1).GetThreadList()); stop_threads(system.Scheduler(2).GetThreadList()); @@ -228,13 +227,11 @@ void Process::LoadModule(CodeSet module_, VAddr base_addr) { MapSegment(module_.DataSegment(), VMAPermission::ReadWrite, MemoryState::CodeMutable); // Clear instruction cache in CPU JIT - Core::System::GetInstance().ArmInterface(0).ClearInstructionCache(); - Core::System::GetInstance().ArmInterface(1).ClearInstructionCache(); - Core::System::GetInstance().ArmInterface(2).ClearInstructionCache(); - Core::System::GetInstance().ArmInterface(3).ClearInstructionCache(); + system.InvalidateCpuInstructionCaches(); } -Process::Process(Core::System& system) : WaitObject{system.Kernel()}, address_arbiter{system} {} +Process::Process(Core::System& system) + : WaitObject{system.Kernel()}, address_arbiter{system}, system{system} {} Process::~Process() = default; void Process::Acquire(Thread* thread) { |