mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-22 04:35:46 +00:00
Kernel: Properly keep track of mutex lock data in the guest memory. This fixes userland locking/unlocking.
This commit is contained in:
parent
ac8f05943b
commit
2ca36ac394
4 changed files with 63 additions and 67 deletions
|
@ -257,10 +257,9 @@ std::vector<std::unique_ptr<WaitTreeItem>> WaitTreeMutex::GetChildren() const {
|
|||
std::vector<std::unique_ptr<WaitTreeItem>> list(WaitTreeWaitObject::GetChildren());
|
||||
|
||||
const auto& mutex = static_cast<const Kernel::Mutex&>(object);
|
||||
if (mutex.lock_count) {
|
||||
list.push_back(
|
||||
std::make_unique<WaitTreeText>(tr("locked %1 times by thread:").arg(mutex.lock_count)));
|
||||
list.push_back(std::make_unique<WaitTreeThread>(*mutex.holding_thread));
|
||||
if (mutex.GetHasWaiters()) {
|
||||
list.push_back(std::make_unique<WaitTreeText>(tr("locked by thread:")));
|
||||
list.push_back(std::make_unique<WaitTreeThread>(*mutex.GetHoldingThread()));
|
||||
} else {
|
||||
list.push_back(std::make_unique<WaitTreeText>(tr("free")));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue