summaryrefslogtreecommitdiff
path: root/src/core/hle/svc.cpp
diff options
context:
space:
mode:
authorGravatar Subv2015-01-10 11:34:50 -0500
committerGravatar Subv2015-01-11 10:42:59 -0500
commit38da198aa14daef3b4dfb83d13e82bde91b98a8d (patch)
treef3b40395a5c4468fb3e3e5bde179c837c37fa2a6 /src/core/hle/svc.cpp
parentMerge pull request #462 from archshift/isbusy (diff)
downloadyuzu-38da198aa14daef3b4dfb83d13e82bde91b98a8d.tar.gz
yuzu-38da198aa14daef3b4dfb83d13e82bde91b98a8d.tar.xz
yuzu-38da198aa14daef3b4dfb83d13e82bde91b98a8d.zip
SVC: Wake up the thread after the delay in WaitSync1
Diffstat (limited to 'src/core/hle/svc.cpp')
-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) {
120 120
121/// Wait for a handle to synchronize, timeout after the specified nanoseconds 121/// Wait for a handle to synchronize, timeout after the specified nanoseconds
122static Result WaitSynchronization1(Handle handle, s64 nano_seconds) { 122static Result WaitSynchronization1(Handle handle, s64 nano_seconds) {
123 // TODO(bunnei): Do something with nano_seconds, currently ignoring this
124 bool wait_infinite = (nano_seconds == -1); // Used to wait until a thread has terminated
125
126 SharedPtr<Kernel::Object> object = Kernel::g_handle_table.GetGeneric(handle); 123 SharedPtr<Kernel::Object> object = Kernel::g_handle_table.GetGeneric(handle);
127 if (object == nullptr) 124 if (object == nullptr)
128 return InvalidHandle(ErrorModule::Kernel).raw; 125 return InvalidHandle(ErrorModule::Kernel).raw;
@@ -134,6 +131,8 @@ static Result WaitSynchronization1(Handle handle, s64 nano_seconds) {
134 131
135 // Check for next thread to schedule 132 // Check for next thread to schedule
136 if (wait.Succeeded() && *wait) { 133 if (wait.Succeeded() && *wait) {
134 // Create an event to wake the thread up after the specified nanosecond delay has passed
135 Kernel::WakeThreadAfterDelay(Kernel::GetCurrentThread(), nano_seconds);
137 HLE::Reschedule(__func__); 136 HLE::Reschedule(__func__);
138 } 137 }
139 138