diff options
| author | 2022-01-18 17:56:08 -0800 | |
|---|---|---|
| committer | 2022-01-20 17:08:00 -0800 | |
| commit | 91ff6d4cb3aa4010e5856993c9291627c5c38f99 (patch) | |
| tree | 5f24fa4d8db6546e255684b8c4b4ee4bd9659f6f /src | |
| parent | hle: kernel: KThread: Decrease DummyThread priority to ensure it is never sch... (diff) | |
| download | yuzu-91ff6d4cb3aa4010e5856993c9291627c5c38f99.tar.gz yuzu-91ff6d4cb3aa4010e5856993c9291627c5c38f99.tar.xz yuzu-91ff6d4cb3aa4010e5856993c9291627c5c38f99.zip | |
hle: kernel: KThread: DummyThread can be waited, ensure wait_queue is not nullptr.
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/kernel/k_thread.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/core/hle/kernel/k_thread.cpp b/src/core/hle/kernel/k_thread.cpp index a599723e6..4cbf12c11 100644 --- a/src/core/hle/kernel/k_thread.cpp +++ b/src/core/hle/kernel/k_thread.cpp | |||
| @@ -1097,14 +1097,14 @@ void KThread::EndWait(ResultCode wait_result_) { | |||
| 1097 | // Lock the scheduler. | 1097 | // Lock the scheduler. |
| 1098 | KScopedSchedulerLock sl(kernel); | 1098 | KScopedSchedulerLock sl(kernel); |
| 1099 | 1099 | ||
| 1100 | // Dummy threads are just used by host threads for locking, and will never have a wait_queue. | ||
| 1101 | if (thread_type == ThreadType::Dummy) { | ||
| 1102 | ASSERT_MSG(false, "Dummy threads should never call EndWait!"); | ||
| 1103 | return; | ||
| 1104 | } | ||
| 1105 | |||
| 1106 | // If we're waiting, notify our queue that we're available. | 1100 | // If we're waiting, notify our queue that we're available. |
| 1107 | if (GetState() == ThreadState::Waiting) { | 1101 | if (GetState() == ThreadState::Waiting) { |
| 1102 | if (wait_queue == nullptr) { | ||
| 1103 | // This should never happen, but avoid a hard crash below to get this logged. | ||
| 1104 | ASSERT_MSG(false, "wait_queue is nullptr!"); | ||
| 1105 | return; | ||
| 1106 | } | ||
| 1107 | |||
| 1108 | wait_queue->EndWait(this, wait_result_); | 1108 | wait_queue->EndWait(this, wait_result_); |
| 1109 | } | 1109 | } |
| 1110 | } | 1110 | } |