hle: kernel: Allocate a dummy KThread for each host thread, and use it for scheduling.

This commit is contained in:
bunnei
2021-01-21 13:00:16 -08:00
parent 37f74d8741
commit 6e953f7f02
8 changed files with 45 additions and 43 deletions

View File

@ -1034,11 +1034,7 @@ ResultVal<std::shared_ptr<KThread>> KThread::Create(Core::System& system, Thread
}
KThread* GetCurrentThreadPointer(KernelCore& kernel) {
if (!kernel.CurrentScheduler()) {
// We are not called from a core thread
return {};
}
return kernel.CurrentScheduler()->GetCurrentThread();
return kernel.GetCurrentEmuThread();
}
KThread& GetCurrentThread(KernelCore& kernel) {