diff options
| author | 2022-07-01 22:40:02 +0200 | |
|---|---|---|
| committer | 2022-07-01 22:40:02 +0200 | |
| commit | 3f3c2dc20fec7c922c4f9ef5774f198fbb6aee31 (patch) | |
| tree | 2e66dc86f9ee31763bbed780e7df2970900fa4df /src/core/hle/kernel | |
| parent | Merge pull request #8490 from liamwhite/read-code-stop (diff) | |
| parent | cpu_manager: properly check idle on return from preemption (diff) | |
| download | yuzu-3f3c2dc20fec7c922c4f9ef5774f198fbb6aee31.tar.gz yuzu-3f3c2dc20fec7c922c4f9ef5774f198fbb6aee31.tar.xz yuzu-3f3c2dc20fec7c922c4f9ef5774f198fbb6aee31.zip | |
Merge pull request #8523 from liamwhite/sc-oopsie
cpu_manager: properly check idle on return from preemption
Diffstat (limited to 'src/core/hle/kernel')
| -rw-r--r-- | src/core/hle/kernel/k_scheduler.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/hle/kernel/k_scheduler.h b/src/core/hle/kernel/k_scheduler.h index 3f90656ee..cc3da33f5 100644 --- a/src/core/hle/kernel/k_scheduler.h +++ b/src/core/hle/kernel/k_scheduler.h | |||
| @@ -55,6 +55,11 @@ public: | |||
| 55 | return idle_thread; | 55 | return idle_thread; |
| 56 | } | 56 | } |
| 57 | 57 | ||
| 58 | /// Returns true if the scheduler is idle | ||
| 59 | [[nodiscard]] bool IsIdle() const { | ||
| 60 | return GetSchedulerCurrentThread() == idle_thread; | ||
| 61 | } | ||
| 62 | |||
| 58 | /// Gets the timestamp for the last context switch in ticks. | 63 | /// Gets the timestamp for the last context switch in ticks. |
| 59 | [[nodiscard]] u64 GetLastContextSwitchTicks() const; | 64 | [[nodiscard]] u64 GetLastContextSwitchTicks() const; |
| 60 | 65 | ||