diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/kernel/kernel.cpp | 2 | ||||
| -rw-r--r-- | src/core/hle/kernel/svc.cpp | 4 | ||||
| -rw-r--r-- | src/core/hle/kernel/thread.cpp | 1 | ||||
| -rw-r--r-- | src/core/hle/kernel/thread.h | 3 | ||||
| -rw-r--r-- | src/yuzu/debugger/wait_tree.cpp | 4 |
5 files changed, 10 insertions, 4 deletions
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp index 4d224d01d..6a7793a3a 100644 --- a/src/core/hle/kernel/kernel.cpp +++ b/src/core/hle/kernel/kernel.cpp | |||
| @@ -62,7 +62,7 @@ static void ThreadWakeupCallback(u64 thread_handle, [[maybe_unused]] int cycles_ | |||
| 62 | 62 | ||
| 63 | if (thread->GetMutexWaitAddress() != 0 || thread->GetCondVarWaitAddress() != 0 || | 63 | if (thread->GetMutexWaitAddress() != 0 || thread->GetCondVarWaitAddress() != 0 || |
| 64 | thread->GetWaitHandle() != 0) { | 64 | thread->GetWaitHandle() != 0) { |
| 65 | ASSERT(thread->GetStatus() == ThreadStatus::WaitMutex); | 65 | ASSERT(thread->GetStatus() == ThreadStatus::WaitMutex || thread->GetStatus() == ThreadStatus::WaitCondVar); |
| 66 | thread->SetMutexWaitAddress(0); | 66 | thread->SetMutexWaitAddress(0); |
| 67 | thread->SetCondVarWaitAddress(0); | 67 | thread->SetCondVarWaitAddress(0); |
| 68 | thread->SetWaitHandle(0); | 68 | thread->SetWaitHandle(0); |
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp index d241b65c7..37608e27a 100644 --- a/src/core/hle/kernel/svc.cpp +++ b/src/core/hle/kernel/svc.cpp | |||
| @@ -1350,7 +1350,7 @@ static ResultCode WaitProcessWideKeyAtomic(VAddr mutex_addr, VAddr condition_var | |||
| 1350 | current_thread->SetCondVarWaitAddress(condition_variable_addr); | 1350 | current_thread->SetCondVarWaitAddress(condition_variable_addr); |
| 1351 | current_thread->SetMutexWaitAddress(mutex_addr); | 1351 | current_thread->SetMutexWaitAddress(mutex_addr); |
| 1352 | current_thread->SetWaitHandle(thread_handle); | 1352 | current_thread->SetWaitHandle(thread_handle); |
| 1353 | current_thread->SetStatus(ThreadStatus::WaitMutex); | 1353 | current_thread->SetStatus(ThreadStatus::WaitCondVar); |
| 1354 | current_thread->InvalidateWakeupCallback(); | 1354 | current_thread->InvalidateWakeupCallback(); |
| 1355 | 1355 | ||
| 1356 | current_thread->WakeAfterDelay(nano_seconds); | 1356 | current_thread->WakeAfterDelay(nano_seconds); |
| @@ -1456,7 +1456,7 @@ static ResultCode SignalProcessWideKey(VAddr condition_variable_addr, s32 target | |||
| 1456 | const auto& handle_table = Core::CurrentProcess()->GetHandleTable(); | 1456 | const auto& handle_table = Core::CurrentProcess()->GetHandleTable(); |
| 1457 | auto owner = handle_table.Get<Thread>(owner_handle); | 1457 | auto owner = handle_table.Get<Thread>(owner_handle); |
| 1458 | ASSERT(owner); | 1458 | ASSERT(owner); |
| 1459 | ASSERT(thread->GetStatus() == ThreadStatus::WaitMutex); | 1459 | ASSERT(thread->GetStatus() == ThreadStatus::WaitCondVar); |
| 1460 | thread->InvalidateWakeupCallback(); | 1460 | thread->InvalidateWakeupCallback(); |
| 1461 | 1461 | ||
| 1462 | owner->AddMutexWaiter(thread); | 1462 | owner->AddMutexWaiter(thread); |
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp index d9ffebc3f..79c80bb01 100644 --- a/src/core/hle/kernel/thread.cpp +++ b/src/core/hle/kernel/thread.cpp | |||
| @@ -105,6 +105,7 @@ void Thread::ResumeFromWait() { | |||
| 105 | case ThreadStatus::WaitSleep: | 105 | case ThreadStatus::WaitSleep: |
| 106 | case ThreadStatus::WaitIPC: | 106 | case ThreadStatus::WaitIPC: |
| 107 | case ThreadStatus::WaitMutex: | 107 | case ThreadStatus::WaitMutex: |
| 108 | case ThreadStatus::WaitCondVar: | ||
| 108 | case ThreadStatus::WaitArb: | 109 | case ThreadStatus::WaitArb: |
| 109 | break; | 110 | break; |
| 110 | 111 | ||
diff --git a/src/core/hle/kernel/thread.h b/src/core/hle/kernel/thread.h index faad5f391..9c684758c 100644 --- a/src/core/hle/kernel/thread.h +++ b/src/core/hle/kernel/thread.h | |||
| @@ -51,7 +51,8 @@ enum class ThreadStatus { | |||
| 51 | WaitIPC, ///< Waiting for the reply from an IPC request | 51 | WaitIPC, ///< Waiting for the reply from an IPC request |
| 52 | WaitSynchAny, ///< Waiting due to WaitSynch1 or WaitSynchN with wait_all = false | 52 | WaitSynchAny, ///< Waiting due to WaitSynch1 or WaitSynchN with wait_all = false |
| 53 | WaitSynchAll, ///< Waiting due to WaitSynchronizationN with wait_all = true | 53 | WaitSynchAll, ///< Waiting due to WaitSynchronizationN with wait_all = true |
| 54 | WaitMutex, ///< Waiting due to an ArbitrateLock/WaitProcessWideKey svc | 54 | WaitMutex, ///< Waiting due to an ArbitrateLock svc |
| 55 | WaitCondVar, ///< Waiting due to an WaitProcessWideKey svc | ||
| 55 | WaitArb, ///< Waiting due to a SignalToAddress/WaitForAddress svc | 56 | WaitArb, ///< Waiting due to a SignalToAddress/WaitForAddress svc |
| 56 | Dormant, ///< Created but not yet made ready | 57 | Dormant, ///< Created but not yet made ready |
| 57 | Dead ///< Run to completion, or forcefully terminated | 58 | Dead ///< Run to completion, or forcefully terminated |
diff --git a/src/yuzu/debugger/wait_tree.cpp b/src/yuzu/debugger/wait_tree.cpp index 06ad74ffe..593bb681f 100644 --- a/src/yuzu/debugger/wait_tree.cpp +++ b/src/yuzu/debugger/wait_tree.cpp | |||
| @@ -234,6 +234,9 @@ QString WaitTreeThread::GetText() const { | |||
| 234 | case Kernel::ThreadStatus::WaitMutex: | 234 | case Kernel::ThreadStatus::WaitMutex: |
| 235 | status = tr("waiting for mutex"); | 235 | status = tr("waiting for mutex"); |
| 236 | break; | 236 | break; |
| 237 | case Kernel::ThreadStatus::WaitCondVar: | ||
| 238 | status = tr("waiting for condition variable"); | ||
| 239 | break; | ||
| 237 | case Kernel::ThreadStatus::WaitArb: | 240 | case Kernel::ThreadStatus::WaitArb: |
| 238 | status = tr("waiting for address arbiter"); | 241 | status = tr("waiting for address arbiter"); |
| 239 | break; | 242 | break; |
| @@ -269,6 +272,7 @@ QColor WaitTreeThread::GetColor() const { | |||
| 269 | case Kernel::ThreadStatus::WaitSynchAll: | 272 | case Kernel::ThreadStatus::WaitSynchAll: |
| 270 | case Kernel::ThreadStatus::WaitSynchAny: | 273 | case Kernel::ThreadStatus::WaitSynchAny: |
| 271 | case Kernel::ThreadStatus::WaitMutex: | 274 | case Kernel::ThreadStatus::WaitMutex: |
| 275 | case Kernel::ThreadStatus::WaitCondVar: | ||
| 272 | case Kernel::ThreadStatus::WaitArb: | 276 | case Kernel::ThreadStatus::WaitArb: |
| 273 | return QColor(Qt::GlobalColor::red); | 277 | return QColor(Qt::GlobalColor::red); |
| 274 | case Kernel::ThreadStatus::Dormant: | 278 | case Kernel::ThreadStatus::Dormant: |