summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2020-11-15 07:37:45 +0100
committerbunnei <bunneidev@gmail.com>2020-11-29 10:31:52 +0100
commitc2ad1243baaf25dcb6f9c80121c48ff6da1986cb (patch)
treef0c11f5fb9ba8cf795ee20a763274fe1bf0a1832
parentcore: arm: Implement InvalidateCacheRange for CPU cache invalidation. (diff)
downloadyuzu-c2ad1243baaf25dcb6f9c80121c48ff6da1986cb.tar
yuzu-c2ad1243baaf25dcb6f9c80121c48ff6da1986cb.tar.gz
yuzu-c2ad1243baaf25dcb6f9c80121c48ff6da1986cb.tar.bz2
yuzu-c2ad1243baaf25dcb6f9c80121c48ff6da1986cb.tar.lz
yuzu-c2ad1243baaf25dcb6f9c80121c48ff6da1986cb.tar.xz
yuzu-c2ad1243baaf25dcb6f9c80121c48ff6da1986cb.tar.zst
yuzu-c2ad1243baaf25dcb6f9c80121c48ff6da1986cb.zip
-rw-r--r--src/core/hle/kernel/thread.cpp5
-rw-r--r--src/core/hle/kernel/thread.h1
-rw-r--r--src/yuzu/debugger/wait_tree.cpp24
3 files changed, 9 insertions, 21 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp
index 3abe12810..7d1eb2c6e 100644
--- a/src/core/hle/kernel/thread.cpp
+++ b/src/core/hle/kernel/thread.cpp
@@ -88,10 +88,6 @@ void Thread::ResumeFromWait() {
// before actually resuming. We can ignore subsequent wakeups if the thread status has
// already been set to ThreadStatus::Ready.
return;
-
- case ThreadStatus::Running:
- DEBUG_ASSERT_MSG(false, "Thread with object id {} has already resumed.", GetObjectId());
- return;
case ThreadStatus::Dead:
// This should never happen, as threads must complete before being stopped.
DEBUG_ASSERT_MSG(false, "Thread with object id {} cannot be resumed because it's DEAD.",
@@ -260,7 +256,6 @@ void Thread::SetStatus(ThreadStatus new_status) {
switch (new_status) {
case ThreadStatus::Ready:
- case ThreadStatus::Running:
SetSchedulingStatus(ThreadSchedStatus::Runnable);
break;
case ThreadStatus::Dormant:
diff --git a/src/core/hle/kernel/thread.h b/src/core/hle/kernel/thread.h
index 20e86fb81..a75071e9b 100644
--- a/src/core/hle/kernel/thread.h
+++ b/src/core/hle/kernel/thread.h
@@ -72,7 +72,6 @@ enum ThreadProcessorId : s32 {
};
enum class ThreadStatus {
- Running, ///< Currently running
Ready, ///< Ready to run
Paused, ///< Paused by SetThreadActivity or debug
WaitHLEEvent, ///< Waiting for hle event to finish
diff --git a/src/yuzu/debugger/wait_tree.cpp b/src/yuzu/debugger/wait_tree.cpp
index 3439cb333..a20824719 100644
--- a/src/yuzu/debugger/wait_tree.cpp
+++ b/src/yuzu/debugger/wait_tree.cpp
@@ -25,7 +25,6 @@ namespace {
constexpr std::array<std::array<Qt::GlobalColor, 2>, 10> WaitTreeColors{{
{Qt::GlobalColor::darkGreen, Qt::GlobalColor::green},
- {Qt::GlobalColor::darkGreen, Qt::GlobalColor::green},
{Qt::GlobalColor::darkBlue, Qt::GlobalColor::cyan},
{Qt::GlobalColor::lightGray, Qt::GlobalColor::lightGray},
{Qt::GlobalColor::lightGray, Qt::GlobalColor::lightGray},
@@ -239,9 +238,6 @@ QString WaitTreeThread::GetText() const {
const auto& thread = static_cast<const Kernel::Thread&>(object);
QString status;
switch (thread.GetStatus()) {
- case Kernel::ThreadStatus::Running:
- status = tr("running");
- break;
case Kernel::ThreadStatus::Ready:
if (!thread.IsPaused()) {
if (thread.WasRunning()) {
@@ -298,34 +294,32 @@ QColor WaitTreeThread::GetColor() const {
const auto& thread = static_cast<const Kernel::Thread&>(object);
switch (thread.GetStatus()) {
- case Kernel::ThreadStatus::Running:
- return QColor(WaitTreeColors[0][color_index]);
case Kernel::ThreadStatus::Ready:
if (!thread.IsPaused()) {
if (thread.WasRunning()) {
- return QColor(WaitTreeColors[1][color_index]);
+ return QColor(WaitTreeColors[0][color_index]);
} else {
- return QColor(WaitTreeColors[2][color_index]);
+ return QColor(WaitTreeColors[1][color_index]);
}
} else {
- return QColor(WaitTreeColors[3][color_index]);
+ return QColor(WaitTreeColors[2][color_index]);
}
case Kernel::ThreadStatus::Paused:
- return QColor(WaitTreeColors[4][color_index]);
+ return QColor(WaitTreeColors[3][color_index]);
case Kernel::ThreadStatus::WaitHLEEvent:
case Kernel::ThreadStatus::WaitIPC:
- return QColor(WaitTreeColors[5][color_index]);
+ return QColor(WaitTreeColors[4][color_index]);
case Kernel::ThreadStatus::WaitSleep:
- return QColor(WaitTreeColors[6][color_index]);
+ return QColor(WaitTreeColors[5][color_index]);
case Kernel::ThreadStatus::WaitSynch:
case Kernel::ThreadStatus::WaitMutex:
case Kernel::ThreadStatus::WaitCondVar:
case Kernel::ThreadStatus::WaitArb:
- return QColor(WaitTreeColors[7][color_index]);
+ return QColor(WaitTreeColors[6][color_index]);
case Kernel::ThreadStatus::Dormant:
- return QColor(WaitTreeColors[8][color_index]);
+ return QColor(WaitTreeColors[7][color_index]);
case Kernel::ThreadStatus::Dead:
- return QColor(WaitTreeColors[9][color_index]);
+ return QColor(WaitTreeColors[8][color_index]);
default:
return WaitTreeItem::GetColor();
}