diff options
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() { | |||
| 133 | if (thread->GetOwnerProcess() != this) | 133 | if (thread->GetOwnerProcess() != this) |
| 134 | continue; | 134 | continue; |
| 135 | 135 | ||
| 136 | if (thread == GetCurrentThread()) | 136 | if (thread == system.CurrentScheduler().GetCurrentThread()) |
| 137 | continue; | 137 | continue; |
| 138 | 138 | ||
| 139 | // TODO(Subv): When are the other running/ready threads terminated? | 139 | // TODO(Subv): When are the other running/ready threads terminated? |
| @@ -145,7 +145,6 @@ void Process::PrepareForTermination() { | |||
| 145 | } | 145 | } |
| 146 | }; | 146 | }; |
| 147 | 147 | ||
| 148 | const auto& system = Core::System::GetInstance(); | ||
| 149 | stop_threads(system.Scheduler(0).GetThreadList()); | 148 | stop_threads(system.Scheduler(0).GetThreadList()); |
| 150 | stop_threads(system.Scheduler(1).GetThreadList()); | 149 | stop_threads(system.Scheduler(1).GetThreadList()); |
| 151 | stop_threads(system.Scheduler(2).GetThreadList()); | 150 | stop_threads(system.Scheduler(2).GetThreadList()); |
| @@ -228,13 +227,11 @@ void Process::LoadModule(CodeSet module_, VAddr base_addr) { | |||
| 228 | MapSegment(module_.DataSegment(), VMAPermission::ReadWrite, MemoryState::CodeMutable); | 227 | MapSegment(module_.DataSegment(), VMAPermission::ReadWrite, MemoryState::CodeMutable); |
| 229 | 228 | ||
| 230 | // Clear instruction cache in CPU JIT | 229 | // Clear instruction cache in CPU JIT |
| 231 | Core::System::GetInstance().ArmInterface(0).ClearInstructionCache(); | 230 | system.InvalidateCpuInstructionCaches(); |
| 232 | Core::System::GetInstance().ArmInterface(1).ClearInstructionCache(); | ||
| 233 | Core::System::GetInstance().ArmInterface(2).ClearInstructionCache(); | ||
| 234 | Core::System::GetInstance().ArmInterface(3).ClearInstructionCache(); | ||
| 235 | } | 231 | } |
| 236 | 232 | ||
| 237 | Process::Process(Core::System& system) : WaitObject{system.Kernel()}, address_arbiter{system} {} | 233 | Process::Process(Core::System& system) |
| 234 | : WaitObject{system.Kernel()}, address_arbiter{system}, system{system} {} | ||
| 238 | Process::~Process() = default; | 235 | Process::~Process() = default; |
| 239 | 236 | ||
| 240 | void Process::Acquire(Thread* thread) { | 237 | void Process::Acquire(Thread* thread) { |