SingleCore: Move Host Timing from a sepparate thread to main cpu thread.

This commit is contained in:
Fernando Sahmkow 2020-03-19 13:09:32 -04:00
parent 5d3a2be04f
commit f2ade343e2
7 changed files with 48 additions and 10 deletions

View file

@ -303,7 +303,7 @@ struct KernelCore::Impl {
}
const Kernel::Scheduler& sched = cores[result.host_handle].Scheduler();
const Kernel::Thread* current = sched.GetCurrentThread();
if (current != nullptr) {
if (current != nullptr && !current->IsPhantomMode()) {
result.guest_handle = current->GetGlobalHandle();
} else {
result.guest_handle = InvalidHandle;

View file

@ -597,6 +597,14 @@ public:
is_continuous_on_svc = is_continuous;
}
bool IsPhantomMode() const {
return is_phantom_mode;
}
void SetPhantomMode(bool phantom) {
is_phantom_mode = phantom;
}
private:
friend class GlobalScheduler;
friend class Scheduler;
@ -699,6 +707,7 @@ private:
bool is_continuous_on_svc = false;
bool will_be_terminated = false;
bool is_phantom_mode = false;
bool was_running = false;