diff options
| author | 2020-03-28 15:23:28 -0400 | |
|---|---|---|
| committer | 2020-06-27 11:36:01 -0400 | |
| commit | f5e32935ca9d1727624c86ca78aff91027caf819 (patch) | |
| tree | a041186cd47fcea90880b300af3351a56fb819aa /src/core/hle/kernel/svc.cpp | |
| parent | Scheduler: Correct Reload/Unload (diff) | |
| download | yuzu-f5e32935ca9d1727624c86ca78aff91027caf819.tar.gz yuzu-f5e32935ca9d1727624c86ca78aff91027caf819.tar.xz yuzu-f5e32935ca9d1727624c86ca78aff91027caf819.zip | |
SingleCore: Use Cycle Timing instead of Host Timing.
Diffstat (limited to 'src/core/hle/kernel/svc.cpp')
| -rw-r--r-- | src/core/hle/kernel/svc.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp index 599972211..c47fa9167 100644 --- a/src/core/hle/kernel/svc.cpp +++ b/src/core/hle/kernel/svc.cpp | |||
| @@ -1534,6 +1534,7 @@ static void SleepThread(Core::System& system, s64 nanoseconds) { | |||
| 1534 | 1534 | ||
| 1535 | if (is_redundant && !system.Kernel().IsMulticore()) { | 1535 | if (is_redundant && !system.Kernel().IsMulticore()) { |
| 1536 | system.Kernel().ExitSVCProfile(); | 1536 | system.Kernel().ExitSVCProfile(); |
| 1537 | system.CoreTiming().AddTicks(1000U); | ||
| 1537 | system.GetCpuManager().PreemptSingleCore(); | 1538 | system.GetCpuManager().PreemptSingleCore(); |
| 1538 | system.Kernel().EnterSVCProfile(); | 1539 | system.Kernel().EnterSVCProfile(); |
| 1539 | } | 1540 | } |
| @@ -1762,6 +1763,10 @@ static u64 GetSystemTick(Core::System& system) { | |||
| 1762 | // Returns the value of cntpct_el0 (https://switchbrew.org/wiki/SVC#svcGetSystemTick) | 1763 | // Returns the value of cntpct_el0 (https://switchbrew.org/wiki/SVC#svcGetSystemTick) |
| 1763 | const u64 result{system.CoreTiming().GetClockTicks()}; | 1764 | const u64 result{system.CoreTiming().GetClockTicks()}; |
| 1764 | 1765 | ||
| 1766 | if (!system.Kernel().IsMulticore()) { | ||
| 1767 | core_timing.AddTicks(400U); | ||
| 1768 | } | ||
| 1769 | |||
| 1765 | return result; | 1770 | return result; |
| 1766 | } | 1771 | } |
| 1767 | 1772 | ||