summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2015-01-12 00:52:09 +0100
committerbunnei <bunneidev@gmail.com>2015-01-12 00:52:09 +0100
commitb33380ca59f827c12183e24ab27e0f08f02211b5 (patch)
tree4d5a81b3bfb41bc035a8957b16fce5ddc8dd0e40 /src
parentMerge pull request #467 from lioncash/msr (diff)
parentSVC: Wake up the thread after the delay in WaitSync1 (diff)
downloadyuzu-b33380ca59f827c12183e24ab27e0f08f02211b5.tar
yuzu-b33380ca59f827c12183e24ab27e0f08f02211b5.tar.gz
yuzu-b33380ca59f827c12183e24ab27e0f08f02211b5.tar.bz2
yuzu-b33380ca59f827c12183e24ab27e0f08f02211b5.tar.lz
yuzu-b33380ca59f827c12183e24ab27e0f08f02211b5.tar.xz
yuzu-b33380ca59f827c12183e24ab27e0f08f02211b5.tar.zst
yuzu-b33380ca59f827c12183e24ab27e0f08f02211b5.zip
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/svc.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/core/hle/svc.cpp b/src/core/hle/svc.cpp
index d3b4483ca..5c6a3be80 100644
--- a/src/core/hle/svc.cpp
+++ b/src/core/hle/svc.cpp
@@ -120,9 +120,6 @@ static Result CloseHandle(Handle handle) {
/// Wait for a handle to synchronize, timeout after the specified nanoseconds
static Result WaitSynchronization1(Handle handle, s64 nano_seconds) {
- // TODO(bunnei): Do something with nano_seconds, currently ignoring this
- bool wait_infinite = (nano_seconds == -1); // Used to wait until a thread has terminated
-
SharedPtr<Kernel::Object> object = Kernel::g_handle_table.GetGeneric(handle);
if (object == nullptr)
return InvalidHandle(ErrorModule::Kernel).raw;
@@ -134,6 +131,8 @@ static Result WaitSynchronization1(Handle handle, s64 nano_seconds) {
// Check for next thread to schedule
if (wait.Succeeded() && *wait) {
+ // Create an event to wake the thread up after the specified nanosecond delay has passed
+ Kernel::WakeThreadAfterDelay(Kernel::GetCurrentThread(), nano_seconds);
HLE::Reschedule(__func__);
}