mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-26 08:42:45 +01:00
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.
This commit is contained in:
parent
11a380c3da
commit
5ffec69dc7
1 changed files with 5 additions and 0 deletions
|
@ -1097,6 +1097,11 @@ void KThread::EndWait(ResultCode wait_result_) {
|
||||||
// Lock the scheduler.
|
// Lock the scheduler.
|
||||||
KScopedSchedulerLock sl(kernel);
|
KScopedSchedulerLock sl(kernel);
|
||||||
|
|
||||||
|
// Dummy threads are just used by host threads for locking, and will never have a wait_queue.
|
||||||
|
if (thread_type == ThreadType::Dummy) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// If we're waiting, notify our queue that we're available.
|
// If we're waiting, notify our queue that we're available.
|
||||||
if (GetState() == ThreadState::Waiting) {
|
if (GetState() == ThreadState::Waiting) {
|
||||||
wait_queue->EndWait(this, wait_result_);
|
wait_queue->EndWait(this, wait_result_);
|
||||||
|
|
Loading…
Reference in a new issue