summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/scheduler.h
diff options
context:
space:
mode:
authorGravatar Fernando Sahmkow2020-03-10 11:50:33 -0400
committerGravatar Fernando Sahmkow2020-06-27 11:35:43 -0400
commita439cdf22ea50f0e39cb51f6dff15fee3b495d16 (patch)
tree2c88310d7cca08ef451107d9ae6bd5191e7d72e5 /src/core/hle/kernel/scheduler.h
parentSynchronization: Correct wide Assertion. (diff)
downloadyuzu-a439cdf22ea50f0e39cb51f6dff15fee3b495d16.tar.gz
yuzu-a439cdf22ea50f0e39cb51f6dff15fee3b495d16.tar.xz
yuzu-a439cdf22ea50f0e39cb51f6dff15fee3b495d16.zip
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.h10
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:
210 /// Reschedules to the next available thread (call after current thread is suspended) 210 /// Reschedules to the next available thread (call after current thread is suspended)
211 void TryDoContextSwitch(); 211 void TryDoContextSwitch();
212 212
213 /// The next two are for SingleCore Only.
214 /// Unload current thread before preempting core.
215 void Unload();
216 /// Reload current thread after core preemption.
217 void Reload();
218
213 /// Gets the current running thread 219 /// Gets the current running thread
214 Thread* GetCurrentThread() const; 220 Thread* GetCurrentThread() const;
215 221
@@ -230,6 +236,10 @@ public:
230 236
231 void OnThreadStart(); 237 void OnThreadStart();
232 238
239 std::shared_ptr<Common::Fiber> ControlContext() {
240 return switch_fiber;
241 }
242
233private: 243private:
234 friend class GlobalScheduler; 244 friend class GlobalScheduler;
235 245