summaryrefslogtreecommitdiff
path: root/src/citra_qt/debugger/wait_tree.cpp
diff options
context:
space:
mode:
authorGravatar Subv2018-01-08 14:12:03 -0500
committerGravatar bunnei2018-01-08 21:12:51 -0500
commit1bbe9309daa96b5fbac7a2df5a2edcb17ab7a05c (patch)
tree71a8fc9f6ab552fb242923372238f691caa4e3d6 /src/citra_qt/debugger/wait_tree.cpp
parentKernel: Allow chaining WaitSynchronization calls inside a wakeup callback. (diff)
downloadyuzu-1bbe9309daa96b5fbac7a2df5a2edcb17ab7a05c.tar.gz
yuzu-1bbe9309daa96b5fbac7a2df5a2edcb17ab7a05c.tar.xz
yuzu-1bbe9309daa96b5fbac7a2df5a2edcb17ab7a05c.zip
Kernel: Properly keep track of mutex lock data in the guest memory. This fixes userland locking/unlocking.
Diffstat (limited to 'src/citra_qt/debugger/wait_tree.cpp')
-rw-r--r--src/citra_qt/debugger/wait_tree.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/citra_qt/debugger/wait_tree.cpp b/src/citra_qt/debugger/wait_tree.cpp
index 8c244b6b2..ebcc02894 100644
--- a/src/citra_qt/debugger/wait_tree.cpp
+++ b/src/citra_qt/debugger/wait_tree.cpp
@@ -257,10 +257,9 @@ std::vector<std::unique_ptr<WaitTreeItem>> WaitTreeMutex::GetChildren() const {
257 std::vector<std::unique_ptr<WaitTreeItem>> list(WaitTreeWaitObject::GetChildren()); 257 std::vector<std::unique_ptr<WaitTreeItem>> list(WaitTreeWaitObject::GetChildren());
258 258
259 const auto& mutex = static_cast<const Kernel::Mutex&>(object); 259 const auto& mutex = static_cast<const Kernel::Mutex&>(object);
260 if (mutex.lock_count) { 260 if (mutex.GetHasWaiters()) {
261 list.push_back( 261 list.push_back(std::make_unique<WaitTreeText>(tr("locked by thread:")));
262 std::make_unique<WaitTreeText>(tr("locked %1 times by thread:").arg(mutex.lock_count))); 262 list.push_back(std::make_unique<WaitTreeThread>(*mutex.GetHoldingThread()));
263 list.push_back(std::make_unique<WaitTreeThread>(*mutex.holding_thread));
264 } else { 263 } else {
265 list.push_back(std::make_unique<WaitTreeText>(tr("free"))); 264 list.push_back(std::make_unique<WaitTreeText>(tr("free")));
266 } 265 }