summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/svc.cpp
diff options
context:
space:
mode:
authorZach Hilman <zachhilman@gmail.com>2018-12-03 23:29:21 +0100
committerZach Hilman <zachhilman@gmail.com>2018-12-03 23:29:30 +0100
commitb5af41a07bebc0a378428e7d7ddc68c9c750d2d1 (patch)
tree97d4e53060fda78d6445ddd99ad24b36b38cec14 /src/core/hle/kernel/svc.cpp
parentsvc: Avoid performance-degrading unnecessary reschedule (diff)
downloadyuzu-b5af41a07bebc0a378428e7d7ddc68c9c750d2d1.tar
yuzu-b5af41a07bebc0a378428e7d7ddc68c9c750d2d1.tar.gz
yuzu-b5af41a07bebc0a378428e7d7ddc68c9c750d2d1.tar.bz2
yuzu-b5af41a07bebc0a378428e7d7ddc68c9c750d2d1.tar.lz
yuzu-b5af41a07bebc0a378428e7d7ddc68c9c750d2d1.tar.xz
yuzu-b5af41a07bebc0a378428e7d7ddc68c9c750d2d1.tar.zst
yuzu-b5af41a07bebc0a378428e7d7ddc68c9c750d2d1.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/kernel/svc.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp
index c119f7be1..fabdedd3d 100644
--- a/src/core/hle/kernel/svc.cpp
+++ b/src/core/hle/kernel/svc.cpp
@@ -984,20 +984,16 @@ static void SleepThread(s64 nanoseconds) {
scheduler.YieldAndWaitForLoadBalancing(GetCurrentThread());
break;
default:
- UNREACHABLE_MSG(
- "Unimplemented sleep yield type '{:016X}'! Falling back to forced reschedule...",
- nanoseconds);
+ UNREACHABLE_MSG("Unimplemented sleep yield type '{:016X}'!", nanoseconds);
}
+ } else {
+ // Sleep current thread and check for next thread to schedule
+ WaitCurrentThread_Sleep();
- nanoseconds = 0;
+ // Create an event to wake the thread up after the specified nanosecond delay has passed
+ GetCurrentThread()->WakeAfterDelay(nanoseconds);
}
- // Sleep current thread and check for next thread to schedule
- WaitCurrentThread_Sleep();
-
- // Create an event to wake the thread up after the specified nanosecond delay has passed
- GetCurrentThread()->WakeAfterDelay(nanoseconds);
-
Core::System::GetInstance().PrepareReschedule();
}