From 33c5982f6d657550cbe28f85f3d29bfdb2a81d17 Mon Sep 17 00:00:00 2001 From: Subv Date: Sun, 1 Oct 2017 22:06:46 -0500 Subject: [PATCH] Kernel/Threads: Added a new thread status to identify threads waiting for an IPC reply from svcSendSyncRequest. --- src/citra_qt/debugger/wait_tree.cpp | 5 +++++ src/core/hle/kernel/thread.cpp | 1 + src/core/hle/kernel/thread.h | 1 + 3 files changed, 7 insertions(+) diff --git a/src/citra_qt/debugger/wait_tree.cpp b/src/citra_qt/debugger/wait_tree.cpp index 8c244b6b2c..2b0d4fdbe8 100644 --- a/src/citra_qt/debugger/wait_tree.cpp +++ b/src/citra_qt/debugger/wait_tree.cpp @@ -154,6 +154,9 @@ QString WaitTreeThread::GetText() const { case THREADSTATUS_WAIT_SLEEP: status = tr("sleeping"); break; + case THREADSTATUS_WAIT_IPC: + status = tr("waiting for IPC response"); + break; case THREADSTATUS_WAIT_SYNCH_ALL: case THREADSTATUS_WAIT_SYNCH_ANY: status = tr("waiting for objects"); @@ -182,6 +185,8 @@ QColor WaitTreeThread::GetColor() const { return QColor(Qt::GlobalColor::darkRed); case THREADSTATUS_WAIT_SLEEP: return QColor(Qt::GlobalColor::darkYellow); + case THREADSTATUS_WAIT_IPC: + return QColor(Qt::GlobalColor::darkCyan); case THREADSTATUS_WAIT_SYNCH_ALL: case THREADSTATUS_WAIT_SYNCH_ANY: return QColor(Qt::GlobalColor::red); diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp index 0f7970ebee..a7c1b45924 100644 --- a/src/core/hle/kernel/thread.cpp +++ b/src/core/hle/kernel/thread.cpp @@ -278,6 +278,7 @@ void Thread::ResumeFromWait() { case THREADSTATUS_WAIT_SYNCH_ANY: case THREADSTATUS_WAIT_ARB: case THREADSTATUS_WAIT_SLEEP: + case THREADSTATUS_WAIT_IPC: break; case THREADSTATUS_READY: diff --git a/src/core/hle/kernel/thread.h b/src/core/hle/kernel/thread.h index 314fba81f4..149a8d1a67 100644 --- a/src/core/hle/kernel/thread.h +++ b/src/core/hle/kernel/thread.h @@ -35,6 +35,7 @@ enum ThreadStatus { THREADSTATUS_READY, ///< Ready to run THREADSTATUS_WAIT_ARB, ///< Waiting on an address arbiter THREADSTATUS_WAIT_SLEEP, ///< Waiting due to a SleepThread SVC + THREADSTATUS_WAIT_IPC, ///< Waiting for the reply from an IPC request THREADSTATUS_WAIT_SYNCH_ANY, ///< Waiting due to WaitSynch1 or WaitSynchN with wait_all = false THREADSTATUS_WAIT_SYNCH_ALL, ///< Waiting due to WaitSynchronizationN with wait_all = true THREADSTATUS_DORMANT, ///< Created but not yet made ready