Преглед на файлове

Mutex: Add the calling thread to the waiting list when needed

This will happen when the mutex is already owned by another thread. Should fix some issues with games being stuck due to waiting threads not being awoken.
Subv преди 11 години
родител
ревизия
ea80363cc2
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      src/core/hle/kernel/mutex.cpp

+ 2 - 2
src/core/hle/kernel/mutex.cpp

@@ -168,9 +168,9 @@ Handle CreateMutex(bool initial_locked, const std::string& name) {
 ResultVal<bool> Mutex::WaitSynchronization() {
     bool wait = locked;
     if (locked) {
+        waiting_threads.push_back(GetCurrentThreadHandle());
         Kernel::WaitCurrentThread(WAITTYPE_MUTEX, GetHandle());
-    }
-    else {
+    } else {
         // Lock the mutex when the first thread accesses it
         locked = true;
         MutexAcquireLock(this);