Kernel: Actually wake up the requested number of threads in Semaphore::Release.
Also properly keep track of data in guest memory, this fixes managing the semaphore from userland. It was found that Semaphores are actually Condition Variables, with Release(1) and Release(-1) being equivalent to notify_one and notify_all. We should change the name of the class to reflect this.
This commit is contained in:
parent
1bbe9309da
commit
db3a525166
4 changed files with 18 additions and 21 deletions
|
@ -273,9 +273,8 @@ std::vector<std::unique_ptr<WaitTreeItem>> WaitTreeSemaphore::GetChildren() cons
|
|||
std::vector<std::unique_ptr<WaitTreeItem>> list(WaitTreeWaitObject::GetChildren());
|
||||
|
||||
const auto& semaphore = static_cast<const Kernel::Semaphore&>(object);
|
||||
list.push_back(
|
||||
std::make_unique<WaitTreeText>(tr("available count = %1").arg(semaphore.available_count)));
|
||||
list.push_back(std::make_unique<WaitTreeText>(tr("max count = %1").arg(semaphore.max_count)));
|
||||
list.push_back(std::make_unique<WaitTreeText>(
|
||||
tr("available count = %1").arg(semaphore.GetAvailableCount())));
|
||||
return list;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue