implement wait tree widget

This commit is contained in:
wwylele 2016-04-08 19:28:54 +03:00
parent c59bdecd23
commit f69a543110
9 changed files with 636 additions and 0 deletions

View file

@ -40,6 +40,10 @@ void WaitObject::WakeupAllWaitingThreads() {
HLE::Reschedule(__func__);
}
const std::vector<SharedPtr<Thread>>& WaitObject::GetWaitingThreads() const {
return waiting_threads;
}
HandleTable::HandleTable() {
next_generation = 1;
Clear();

View file

@ -149,6 +149,9 @@ public:
/// Wake up all threads waiting on this object
void WakeupAllWaitingThreads();
/// Get a const reference to the waiting threads list for debug use
const std::vector<SharedPtr<Thread>>& GetWaitingThreads() const;
private:
/// Threads waiting for this object to become available
std::vector<SharedPtr<Thread>> waiting_threads;

View file

@ -665,4 +665,8 @@ void ThreadingShutdown() {
ready_queue.clear();
}
const std::vector<SharedPtr<Thread>>& GetThreadList() {
return thread_list;
}
} // namespace

View file

@ -236,4 +236,9 @@ void ThreadingInit();
*/
void ThreadingShutdown();
/**
* Get a const reference to the thread list for debug use
*/
const std::vector<SharedPtr<Thread>>& GetThreadList();
} // namespace