diff options
| author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2020-03-10 11:50:33 -0400 |
|---|---|---|
| committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2020-06-27 11:35:43 -0400 |
| commit | a439cdf22ea50f0e39cb51f6dff15fee3b495d16 (patch) | |
| tree | 2c88310d7cca08ef451107d9ae6bd5191e7d72e5 /src/core/hle/kernel/scheduler.h | |
| parent | 8a78fc25802b8f69d073b703728a3501c98bf5e8 (diff) | |
CPU_Manager: Unload/Reload threads on preemption on SingleCore
Diffstat (limited to 'src/core/hle/kernel/scheduler.h')
| -rw-r--r-- | src/core/hle/kernel/scheduler.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/core/hle/kernel/scheduler.h b/src/core/hle/kernel/scheduler.h index 5e062bf59..f63cc5085 100644 --- a/src/core/hle/kernel/scheduler.h +++ b/src/core/hle/kernel/scheduler.h @@ -210,6 +210,12 @@ public: /// Reschedules to the next available thread (call after current thread is suspended) void TryDoContextSwitch(); + /// The next two are for SingleCore Only. + /// Unload current thread before preempting core. + void Unload(); + /// Reload current thread after core preemption. + void Reload(); + /// Gets the current running thread Thread* GetCurrentThread() const; @@ -230,6 +236,10 @@ public: void OnThreadStart(); + std::shared_ptr<Common::Fiber> ControlContext() { + return switch_fiber; + } + private: friend class GlobalScheduler; |
