summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/svc.cpp
diff options
context:
space:
mode:
authorZach Hilman <zachhilman@gmail.com>2018-12-05 04:11:32 +0100
committerZach Hilman <zachhilman@gmail.com>2018-12-05 04:11:32 +0100
commite6f7825a248dd0ff9f2e3fdccabdbe3631622861 (patch)
tree0f262d3fdd0eeda6bc7a11639d6487158f759e5a /src/core/hle/kernel/svc.cpp
parentscheduler: Avoid manual Reschedule call (diff)
downloadyuzu-e6f7825a248dd0ff9f2e3fdccabdbe3631622861.tar
yuzu-e6f7825a248dd0ff9f2e3fdccabdbe3631622861.tar.gz
yuzu-e6f7825a248dd0ff9f2e3fdccabdbe3631622861.tar.bz2
yuzu-e6f7825a248dd0ff9f2e3fdccabdbe3631622861.tar.lz
yuzu-e6f7825a248dd0ff9f2e3fdccabdbe3631622861.tar.xz
yuzu-e6f7825a248dd0ff9f2e3fdccabdbe3631622861.tar.zst
yuzu-e6f7825a248dd0ff9f2e3fdccabdbe3631622861.zip
Diffstat (limited to 'src/core/hle/kernel/svc.cpp')
-rw-r--r--src/core/hle/kernel/svc.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp
index 29c2c2d03..e3cf3f909 100644
--- a/src/core/hle/kernel/svc.cpp
+++ b/src/core/hle/kernel/svc.cpp
@@ -960,11 +960,6 @@ static void ExitThread() {
static void SleepThread(s64 nanoseconds) {
LOG_TRACE(Kernel_SVC, "called nanoseconds={}", nanoseconds);
- // Don't attempt to yield execution if there are no available threads to run,
- // this way we avoid a useless reschedule to the idle thread.
- if (nanoseconds <= 0 && !Core::System::GetInstance().CurrentScheduler().HaveReadyThreads())
- return;
-
enum class SleepType : s64 {
YieldWithoutLoadBalancing = 0,
YieldWithLoadBalancing = -1,
@@ -995,7 +990,7 @@ static void SleepThread(s64 nanoseconds) {
}
// Reschedule all CPU cores
- for (std::size_t i = 0; i < 4; ++i)
+ for (std::size_t i = 0; i < Core::NUM_CPU_CORES; ++i)
Core::System::GetInstance().CpuCore(i).PrepareReschedule();
}