diff options
| author | 2020-03-10 18:41:11 -0400 | |
|---|---|---|
| committer | 2020-06-27 11:35:46 -0400 | |
| commit | f370de84b16f9d668b7d5dcc0fd851264e2e6144 (patch) | |
| tree | 1fedb0bc3338587a328b573c3319fba7cdd0c3bc /src/core/hle/kernel/svc.cpp | |
| parent | Kernel: Preempt Single core on redudant yields. (diff) | |
| download | yuzu-f370de84b16f9d668b7d5dcc0fd851264e2e6144.tar.gz yuzu-f370de84b16f9d668b7d5dcc0fd851264e2e6144.tar.xz yuzu-f370de84b16f9d668b7d5dcc0fd851264e2e6144.zip | |
Kernel: Rewind on SVC change.
Diffstat (limited to 'src/core/hle/kernel/svc.cpp')
| -rw-r--r-- | src/core/hle/kernel/svc.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp index eca92b356..d3d4e7bf9 100644 --- a/src/core/hle/kernel/svc.cpp +++ b/src/core/hle/kernel/svc.cpp | |||
| @@ -2459,7 +2459,8 @@ MICROPROFILE_DEFINE(Kernel_SVC, "Kernel", "SVC", MP_RGB(70, 200, 70)); | |||
| 2459 | void Call(Core::System& system, u32 immediate) { | 2459 | void Call(Core::System& system, u32 immediate) { |
| 2460 | MICROPROFILE_SCOPE(Kernel_SVC); | 2460 | MICROPROFILE_SCOPE(Kernel_SVC); |
| 2461 | 2461 | ||
| 2462 | auto& physical_core = system.CurrentPhysicalCore(); | 2462 | auto* thread = system.CurrentScheduler().GetCurrentThread(); |
| 2463 | thread->SetContinuousOnSVC(true); | ||
| 2463 | 2464 | ||
| 2464 | const FunctionDef* info = system.CurrentProcess()->Is64BitProcess() ? GetSVCInfo64(immediate) | 2465 | const FunctionDef* info = system.CurrentProcess()->Is64BitProcess() ? GetSVCInfo64(immediate) |
| 2465 | : GetSVCInfo32(immediate); | 2466 | : GetSVCInfo32(immediate); |
| @@ -2472,10 +2473,8 @@ void Call(Core::System& system, u32 immediate) { | |||
| 2472 | } else { | 2473 | } else { |
| 2473 | LOG_CRITICAL(Kernel_SVC, "Unknown SVC function 0x{:X}", immediate); | 2474 | LOG_CRITICAL(Kernel_SVC, "Unknown SVC function 0x{:X}", immediate); |
| 2474 | } | 2475 | } |
| 2475 | auto& physical_core_2 = system.CurrentPhysicalCore(); | 2476 | |
| 2476 | if (physical_core.CoreIndex() != physical_core_2.CoreIndex()) { | 2477 | if (!thread->IsContinuousOnSVC()) { |
| 2477 | LOG_CRITICAL(Kernel_SVC, "Rewinding"); | ||
| 2478 | auto* thread = physical_core_2.Scheduler().GetCurrentThread(); | ||
| 2479 | auto* host_context = thread->GetHostContext().get(); | 2478 | auto* host_context = thread->GetHostContext().get(); |
| 2480 | host_context->Rewind(); | 2479 | host_context->Rewind(); |
| 2481 | } | 2480 | } |