summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/scheduler.cpp
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2020-05-13 20:17:34 +0200
committerFernando Sahmkow <fsahmkow27@gmail.com>2020-06-27 17:36:15 +0200
commitd24014358883987d7ebdafc4863a7bc36addfa1b (patch)
tree4277b9194972e40e124f130f2759268bf14cd4d6 /src/core/hle/kernel/scheduler.cpp
parentYuzuQT: Hide Speed UI on Multicore. (diff)
downloadyuzu-d24014358883987d7ebdafc4863a7bc36addfa1b.tar
yuzu-d24014358883987d7ebdafc4863a7bc36addfa1b.tar.gz
yuzu-d24014358883987d7ebdafc4863a7bc36addfa1b.tar.bz2
yuzu-d24014358883987d7ebdafc4863a7bc36addfa1b.tar.lz
yuzu-d24014358883987d7ebdafc4863a7bc36addfa1b.tar.xz
yuzu-d24014358883987d7ebdafc4863a7bc36addfa1b.tar.zst
yuzu-d24014358883987d7ebdafc4863a7bc36addfa1b.zip
Diffstat (limited to 'src/core/hle/kernel/scheduler.cpp')
-rw-r--r--src/core/hle/kernel/scheduler.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/core/hle/kernel/scheduler.cpp b/src/core/hle/kernel/scheduler.cpp
index 43c924fa0..61b8a396a 100644
--- a/src/core/hle/kernel/scheduler.cpp
+++ b/src/core/hle/kernel/scheduler.cpp
@@ -736,15 +736,15 @@ void Scheduler::SwitchContext() {
previous_thread->context_guard.unlock();
}
- std::shared_ptr<Common::Fiber> old_context;
+ std::shared_ptr<Common::Fiber>* old_context;
if (previous_thread != nullptr) {
- old_context = previous_thread->GetHostContext();
+ old_context = &previous_thread->GetHostContext();
} else {
- old_context = idle_thread->GetHostContext();
+ old_context = &idle_thread->GetHostContext();
}
guard.unlock();
- Common::Fiber::YieldTo(old_context, switch_fiber);
+ Common::Fiber::YieldTo(*old_context, switch_fiber);
/// When a thread wakes up, the scheduler may have changed to other in another core.
auto& next_scheduler = system.Kernel().CurrentScheduler();
next_scheduler.SwitchContextStep2();
@@ -774,13 +774,13 @@ void Scheduler::SwitchToCurrent() {
break;
}
}
- std::shared_ptr<Common::Fiber> next_context;
+ std::shared_ptr<Common::Fiber>* next_context;
if (current_thread != nullptr) {
- next_context = current_thread->GetHostContext();
+ next_context = &current_thread->GetHostContext();
} else {
- next_context = idle_thread->GetHostContext();
+ next_context = &idle_thread->GetHostContext();
}
- Common::Fiber::YieldTo(switch_fiber, next_context);
+ Common::Fiber::YieldTo(switch_fiber, *next_context);
}
}
}