diff options
| author | 2022-01-17 16:44:14 -0800 | |
|---|---|---|
| committer | 2022-01-20 17:08:00 -0800 | |
| commit | 11a380c3dae0ac5a419d91dc41a5aa32c4c72868 (patch) | |
| tree | f87e4c9dbde4da94300903251d65401c8782ed99 /src | |
| parent | hle: kernel: KThread: Rename thread_type_for_debugging -> thread_type. (diff) | |
| download | yuzu-11a380c3dae0ac5a419d91dc41a5aa32c4c72868.tar.gz yuzu-11a380c3dae0ac5a419d91dc41a5aa32c4c72868.tar.xz yuzu-11a380c3dae0ac5a419d91dc41a5aa32c4c72868.zip | |
hle: kernel: KScheduler: Ensure dummy threads are never scheduled.
- These are only used by host threads for locking.
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/kernel/k_scheduler.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/hle/kernel/k_scheduler.cpp b/src/core/hle/kernel/k_scheduler.cpp index f900b2e7a..5d39a1d4a 100644 --- a/src/core/hle/kernel/k_scheduler.cpp +++ b/src/core/hle/kernel/k_scheduler.cpp | |||
| @@ -739,6 +739,11 @@ void KScheduler::ScheduleImpl() { | |||
| 739 | next_thread = idle_thread; | 739 | next_thread = idle_thread; |
| 740 | } | 740 | } |
| 741 | 741 | ||
| 742 | // We never want to schedule a dummy thread, as these are only used by host threads for locking. | ||
| 743 | if (next_thread->GetThreadType() == ThreadType::Dummy) { | ||
| 744 | next_thread = idle_thread; | ||
| 745 | } | ||
| 746 | |||
| 742 | // If we're not actually switching thread, there's nothing to do. | 747 | // If we're not actually switching thread, there's nothing to do. |
| 743 | if (next_thread == current_thread.load()) { | 748 | if (next_thread == current_thread.load()) { |
| 744 | previous_thread->EnableDispatch(); | 749 | previous_thread->EnableDispatch(); |