early-access version 3136

This commit is contained in:
pineappleEA
2022-11-20 03:30:00 +01:00
parent 9e948367b3
commit 54b4c3c044
6 changed files with 52 additions and 151 deletions

View File

@@ -180,7 +180,7 @@ void CpuManager::ShutdownThread() {
auto* thread = kernel.GetCurrentEmuThread();
auto core = is_multicore ? kernel.CurrentPhysicalCoreIndex() : 0;
Common::Fiber::YieldTo(thread->GetHostContext(), core_data[core].host_context);
Common::Fiber::YieldTo(thread->GetHostContext(), *core_data[core].host_context);
UNREACHABLE();
}
@@ -217,7 +217,7 @@ void CpuManager::RunThread(std::size_t core) {
auto* thread = scheduler.GetSchedulerCurrentThread();
Kernel::SetCurrentThread(kernel, thread);
Common::Fiber::YieldTo(data.host_context, thread->GetHostContext());
Common::Fiber::YieldTo(data.host_context, *thread->GetHostContext());
}
} // namespace Core

View File

@@ -116,7 +116,7 @@ void KScheduler::PreemptSingleCore() {
auto& previous_scheduler = kernel.Scheduler(thread->GetCurrentCore());
previous_scheduler.Unload(thread);
Common::Fiber::YieldTo(thread->GetHostContext(), m_switch_fiber);
Common::Fiber::YieldTo(thread->GetHostContext(), *m_switch_fiber);
GetCurrentThread(kernel).EnableDispatch();
}
@@ -411,7 +411,7 @@ void KScheduler::ScheduleImpl() {
m_switch_cur_thread = cur_thread;
m_switch_highest_priority_thread = highest_priority_thread;
m_switch_from_schedule = true;
Common::Fiber::YieldTo(cur_thread->host_context, m_switch_fiber);
Common::Fiber::YieldTo(cur_thread->host_context, *m_switch_fiber);
// Returning from ScheduleImpl occurs after this thread has been scheduled again.
}
@@ -489,7 +489,7 @@ void KScheduler::ScheduleImplFiber() {
Reload(highest_priority_thread);
// Reload the host thread.
Common::Fiber::YieldTo(m_switch_fiber, highest_priority_thread->host_context);
Common::Fiber::YieldTo(m_switch_fiber, *highest_priority_thread->host_context);
}
void KScheduler::Unload(KThread* thread) {