summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/svc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/kernel/svc.cpp')
-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) {
984 scheduler.YieldAndWaitForLoadBalancing(GetCurrentThread()); 984 scheduler.YieldAndWaitForLoadBalancing(GetCurrentThread());
985 break; 985 break;
986 default: 986 default:
987 UNREACHABLE_MSG( 987 UNREACHABLE_MSG("Unimplemented sleep yield type '{:016X}'!", nanoseconds);
988 "Unimplemented sleep yield type '{:016X}'! Falling back to forced reschedule...",
989 nanoseconds);
990 } 988 }
989 } else {
990 // Sleep current thread and check for next thread to schedule
991 WaitCurrentThread_Sleep();
991 992
992 nanoseconds = 0; 993 // Create an event to wake the thread up after the specified nanosecond delay has passed
994 GetCurrentThread()->WakeAfterDelay(nanoseconds);
993 } 995 }
994 996
995 // Sleep current thread and check for next thread to schedule
996 WaitCurrentThread_Sleep();
997
998 // Create an event to wake the thread up after the specified nanosecond delay has passed
999 GetCurrentThread()->WakeAfterDelay(nanoseconds);
1000
1001 Core::System::GetInstance().PrepareReschedule(); 997 Core::System::GetInstance().PrepareReschedule();
1002} 998}
1003 999