diff options
| author | 2022-01-17 16:46:29 -0800 | |
|---|---|---|
| committer | 2022-01-20 17:08:00 -0800 | |
| commit | 5ffec69dc79f489631916b71d89090e837997f01 (patch) | |
| tree | 7c09c67615bd67a1adb1f72bef34758f47994a7e /src | |
| parent | hle: kernel: KScheduler: Ensure dummy threads are never scheduled. (diff) | |
| download | yuzu-5ffec69dc79f489631916b71d89090e837997f01.tar.gz yuzu-5ffec69dc79f489631916b71d89090e837997f01.tar.xz yuzu-5ffec69dc79f489631916b71d89090e837997f01.zip | |
hle: kernel: KThread: Ensure dummy threads never call EndWait.
- These are only used by host threads for locking and will never have a wait_queue.
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/kernel/k_thread.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/hle/kernel/k_thread.cpp b/src/core/hle/kernel/k_thread.cpp index 5eb64a381..35c4a7581 100644 --- a/src/core/hle/kernel/k_thread.cpp +++ b/src/core/hle/kernel/k_thread.cpp | |||
| @@ -1097,6 +1097,11 @@ 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 | return; | ||
| 1103 | } | ||
| 1104 | |||
| 1100 | // If we're waiting, notify our queue that we're available. | 1105 | // If we're waiting, notify our queue that we're available. |
| 1101 | if (GetState() == ThreadState::Waiting) { | 1106 | if (GetState() == ThreadState::Waiting) { |
| 1102 | wait_queue->EndWait(this, wait_result_); | 1107 | wait_queue->EndWait(this, wait_result_); |