diff options
| author | 2020-03-12 16:48:43 -0400 | |
|---|---|---|
| committer | 2020-06-27 11:35:48 -0400 | |
| commit | 7020d498c5aef7c1180bfc57031cdd7fbfecdf0f (patch) | |
| tree | f2508e39a02966cdd4d9acda1e14ed93cdc150cd /src/core/hle/kernel/scheduler.cpp | |
| parent | General: Fix Stop function (diff) | |
| download | yuzu-7020d498c5aef7c1180bfc57031cdd7fbfecdf0f.tar.gz yuzu-7020d498c5aef7c1180bfc57031cdd7fbfecdf0f.tar.xz yuzu-7020d498c5aef7c1180bfc57031cdd7fbfecdf0f.zip | |
General: Fix microprofile on dynarmic/svc, fix wait tree showing which threads were running.
Diffstat (limited to 'src/core/hle/kernel/scheduler.cpp')
| -rw-r--r-- | src/core/hle/kernel/scheduler.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/hle/kernel/scheduler.cpp b/src/core/hle/kernel/scheduler.cpp index 25fc8a3e8..2ad380b17 100644 --- a/src/core/hle/kernel/scheduler.cpp +++ b/src/core/hle/kernel/scheduler.cpp | |||
| @@ -354,7 +354,9 @@ void GlobalScheduler::EnableInterruptAndSchedule(u32 cores_pending_reschedule, | |||
| 354 | } | 354 | } |
| 355 | if (must_context_switch) { | 355 | if (must_context_switch) { |
| 356 | auto& core_scheduler = kernel.CurrentScheduler(); | 356 | auto& core_scheduler = kernel.CurrentScheduler(); |
| 357 | kernel.ExitSVCProfile(); | ||
| 357 | core_scheduler.TryDoContextSwitch(); | 358 | core_scheduler.TryDoContextSwitch(); |
| 359 | kernel.EnterSVCProfile(); | ||
| 358 | } | 360 | } |
| 359 | } | 361 | } |
| 360 | 362 | ||
| @@ -628,6 +630,7 @@ void Scheduler::Reload() { | |||
| 628 | 630 | ||
| 629 | // Cancel any outstanding wakeup events for this thread | 631 | // Cancel any outstanding wakeup events for this thread |
| 630 | thread->SetIsRunning(true); | 632 | thread->SetIsRunning(true); |
| 633 | thread->SetWasRunning(false); | ||
| 631 | thread->last_running_ticks = system.CoreTiming().GetCPUTicks(); | 634 | thread->last_running_ticks = system.CoreTiming().GetCPUTicks(); |
| 632 | 635 | ||
| 633 | auto* const thread_owner_process = thread->GetOwnerProcess(); | 636 | auto* const thread_owner_process = thread->GetOwnerProcess(); |
| @@ -660,6 +663,7 @@ void Scheduler::SwitchContextStep2() { | |||
| 660 | // Cancel any outstanding wakeup events for this thread | 663 | // Cancel any outstanding wakeup events for this thread |
| 661 | new_thread->SetIsRunning(true); | 664 | new_thread->SetIsRunning(true); |
| 662 | new_thread->last_running_ticks = system.CoreTiming().GetCPUTicks(); | 665 | new_thread->last_running_ticks = system.CoreTiming().GetCPUTicks(); |
| 666 | new_thread->SetWasRunning(false); | ||
| 663 | 667 | ||
| 664 | auto* const thread_owner_process = current_thread->GetOwnerProcess(); | 668 | auto* const thread_owner_process = current_thread->GetOwnerProcess(); |
| 665 | if (previous_process != thread_owner_process && thread_owner_process != nullptr) { | 669 | if (previous_process != thread_owner_process && thread_owner_process != nullptr) { |
| @@ -698,6 +702,9 @@ void Scheduler::SwitchContext() { | |||
| 698 | 702 | ||
| 699 | // Save context for previous thread | 703 | // Save context for previous thread |
| 700 | if (previous_thread) { | 704 | if (previous_thread) { |
| 705 | if (new_thread != nullptr && new_thread->IsSuspendThread()) { | ||
| 706 | previous_thread->SetWasRunning(true); | ||
| 707 | } | ||
| 701 | previous_thread->SetContinuousOnSVC(false); | 708 | previous_thread->SetContinuousOnSVC(false); |
| 702 | previous_thread->last_running_ticks = system.CoreTiming().GetCPUTicks(); | 709 | previous_thread->last_running_ticks = system.CoreTiming().GetCPUTicks(); |
| 703 | if (!previous_thread->IsHLEThread()) { | 710 | if (!previous_thread->IsHLEThread()) { |