summaryrefslogtreecommitdiff
path: root/src/core/hle/svc.cpp
diff options
context:
space:
mode:
authorGravatar bunnei2015-01-20 20:53:52 -0500
committerGravatar bunnei2015-01-21 20:48:46 -0500
commit68ddaaa2f5726e3619accee77b488ec285f3a2d7 (patch)
treef9d349d09c66efe768fbb4aed67b7b163c3ffec7 /src/core/hle/svc.cpp
parentThread: Use std::find in CheckWait_WaitObject. (diff)
downloadyuzu-68ddaaa2f5726e3619accee77b488ec285f3a2d7.tar.gz
yuzu-68ddaaa2f5726e3619accee77b488ec285f3a2d7.tar.xz
yuzu-68ddaaa2f5726e3619accee77b488ec285f3a2d7.zip
Thread: Fix WaitSynchronization1 to not set register 1 on thread wakeup.
Diffstat (limited to 'src/core/hle/svc.cpp')
-rw-r--r--src/core/hle/svc.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/hle/svc.cpp b/src/core/hle/svc.cpp
index f6c912502..89095ac91 100644
--- a/src/core/hle/svc.cpp
+++ b/src/core/hle/svc.cpp
@@ -126,7 +126,7 @@ static Result WaitSynchronization1(Handle handle, s64 nano_seconds) {
126 if (object->ShouldWait()) { 126 if (object->ShouldWait()) {
127 127
128 object->AddWaitingThread(Kernel::GetCurrentThread()); 128 object->AddWaitingThread(Kernel::GetCurrentThread());
129 Kernel::WaitCurrentThread_WaitSynchronization(object); 129 Kernel::WaitCurrentThread_WaitSynchronization(object, false, false);
130 130
131 // Create an event to wake the thread up after the specified nanosecond delay has passed 131 // Create an event to wake the thread up after the specified nanosecond delay has passed
132 Kernel::WakeThreadAfterDelay(Kernel::GetCurrentThread(), nano_seconds); 132 Kernel::WakeThreadAfterDelay(Kernel::GetCurrentThread(), nano_seconds);
@@ -187,7 +187,7 @@ static Result WaitSynchronizationN(s32* out, Handle* handles, s32 handle_count,
187 // NOTE: This should deadlock the current thread if no timeout was specified 187 // NOTE: This should deadlock the current thread if no timeout was specified
188 if (!wait_all) { 188 if (!wait_all) {
189 wait_thread = true; 189 wait_thread = true;
190 Kernel::WaitCurrentThread_Sleep(); 190 Kernel::WaitCurrentThread_WaitSynchronization(nullptr, true, wait_all);
191 } 191 }
192 } 192 }
193 193
@@ -198,7 +198,7 @@ static Result WaitSynchronizationN(s32* out, Handle* handles, s32 handle_count,
198 for (int i = 0; i < handle_count; ++i) { 198 for (int i = 0; i < handle_count; ++i) {
199 auto object = Kernel::g_handle_table.GetWaitObject(handles[i]); 199 auto object = Kernel::g_handle_table.GetWaitObject(handles[i]);
200 object->AddWaitingThread(Kernel::GetCurrentThread()); 200 object->AddWaitingThread(Kernel::GetCurrentThread());
201 Kernel::WaitCurrentThread_WaitSynchronization(object, wait_all); 201 Kernel::WaitCurrentThread_WaitSynchronization(object, true, wait_all);
202 } 202 }
203 203
204 // Create an event to wake the thread up after the specified nanosecond delay has passed 204 // Create an event to wake the thread up after the specified nanosecond delay has passed