General: Move ARM_Interface into Threads.

This commit is contained in:
Fernando Sahmkow 2020-03-01 12:14:17 -04:00
parent 1b82ccec22
commit 1567824d2d
18 changed files with 136 additions and 170 deletions

View file

@ -1533,7 +1533,9 @@ static void SleepThread(Core::System& system, s64 nanoseconds) {
}
if (is_redundant && !system.Kernel().IsMulticore()) {
system.Kernel().ExitSVCProfile();
system.GetCpuManager().PreemptSingleCore();
system.Kernel().EnterSVCProfile();
}
}
@ -2457,9 +2459,6 @@ void Call(Core::System& system, u32 immediate) {
auto& kernel = system.Kernel();
kernel.EnterSVCProfile();
auto* thread = system.CurrentScheduler().GetCurrentThread();
thread->SetContinuousOnSVC(true);
const FunctionDef* info = system.CurrentProcess()->Is64BitProcess() ? GetSVCInfo64(immediate)
: GetSVCInfo32(immediate);
if (info) {
@ -2473,12 +2472,6 @@ void Call(Core::System& system, u32 immediate) {
}
kernel.ExitSVCProfile();
if (!thread->IsContinuousOnSVC()) {
auto* host_context = thread->GetHostContext().get();
host_context->Rewind();
}
system.EnterDynarmicProfile();
}