diff options
| author | 2017-01-04 10:44:38 -0500 | |
|---|---|---|
| committer | 2017-01-04 15:58:50 -0500 | |
| commit | cef5f45de2fd64f0728d4504d0ad7434cb8ac519 (patch) | |
| tree | a8297434a72bc21d1cec17e3414766ece0ec0054 /src/citra_qt/debugger/wait_tree.cpp | |
| parent | Kernel/Mutex: Propagate thread priority changes to other threads inheriting t... (diff) | |
| download | yuzu-cef5f45de2fd64f0728d4504d0ad7434cb8ac519.tar.gz yuzu-cef5f45de2fd64f0728d4504d0ad7434cb8ac519.tar.xz yuzu-cef5f45de2fd64f0728d4504d0ad7434cb8ac519.zip | |
Kernel: Use different thread statuses when a thread calls WaitSynchronization1 and WaitSynchronizationN with wait_all = true.
This commit removes the overly general THREADSTATUS_WAIT_SYNCH and replaces it with two more granular statuses:
THREADSTATUS_WAIT_SYNCH_ANY when a thread waits on objects via WaitSynchronization1 or WaitSynchronizationN with wait_all = false.
THREADSTATUS_WAIT_SYNCH_ALL when a thread waits on objects via WaitSynchronizationN with wait_all = true.
Diffstat (limited to 'src/citra_qt/debugger/wait_tree.cpp')
| -rw-r--r-- | src/citra_qt/debugger/wait_tree.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/citra_qt/debugger/wait_tree.cpp b/src/citra_qt/debugger/wait_tree.cpp index 1d2de5185..b6ecf3819 100644 --- a/src/citra_qt/debugger/wait_tree.cpp +++ b/src/citra_qt/debugger/wait_tree.cpp | |||
| @@ -153,7 +153,8 @@ QString WaitTreeThread::GetText() const { | |||
| 153 | case THREADSTATUS_WAIT_SLEEP: | 153 | case THREADSTATUS_WAIT_SLEEP: |
| 154 | status = tr("sleeping"); | 154 | status = tr("sleeping"); |
| 155 | break; | 155 | break; |
| 156 | case THREADSTATUS_WAIT_SYNCH: | 156 | case THREADSTATUS_WAIT_SYNCH_ALL: |
| 157 | case THREADSTATUS_WAIT_SYNCH_ANY: | ||
| 157 | status = tr("waiting for objects"); | 158 | status = tr("waiting for objects"); |
| 158 | break; | 159 | break; |
| 159 | case THREADSTATUS_DORMANT: | 160 | case THREADSTATUS_DORMANT: |
| @@ -180,7 +181,8 @@ QColor WaitTreeThread::GetColor() const { | |||
| 180 | return QColor(Qt::GlobalColor::darkRed); | 181 | return QColor(Qt::GlobalColor::darkRed); |
| 181 | case THREADSTATUS_WAIT_SLEEP: | 182 | case THREADSTATUS_WAIT_SLEEP: |
| 182 | return QColor(Qt::GlobalColor::darkYellow); | 183 | return QColor(Qt::GlobalColor::darkYellow); |
| 183 | case THREADSTATUS_WAIT_SYNCH: | 184 | case THREADSTATUS_WAIT_SYNCH_ALL: |
| 185 | case THREADSTATUS_WAIT_SYNCH_ANY: | ||
| 184 | return QColor(Qt::GlobalColor::red); | 186 | return QColor(Qt::GlobalColor::red); |
| 185 | case THREADSTATUS_DORMANT: | 187 | case THREADSTATUS_DORMANT: |
| 186 | return QColor(Qt::GlobalColor::darkCyan); | 188 | return QColor(Qt::GlobalColor::darkCyan); |
| @@ -228,7 +230,8 @@ std::vector<std::unique_ptr<WaitTreeItem>> WaitTreeThread::GetChildren() const { | |||
| 228 | } else { | 230 | } else { |
| 229 | list.push_back(std::make_unique<WaitTreeMutexList>(thread.held_mutexes)); | 231 | list.push_back(std::make_unique<WaitTreeMutexList>(thread.held_mutexes)); |
| 230 | } | 232 | } |
| 231 | if (thread.status == THREADSTATUS_WAIT_SYNCH) { | 233 | if (thread.status == THREADSTATUS_WAIT_SYNCH_ANY || |
| 234 | thread.status == THREADSTATUS_WAIT_SYNCH_ALL) { | ||
| 232 | list.push_back(std::make_unique<WaitTreeObjectList>(thread.wait_objects, | 235 | list.push_back(std::make_unique<WaitTreeObjectList>(thread.wait_objects, |
| 233 | thread.IsSleepingOnWaitAll())); | 236 | thread.IsSleepingOnWaitAll())); |
| 234 | } | 237 | } |