CPU_Manager: Unload/Reload threads on preemption on SingleCore
This commit is contained in:
parent
8a78fc2580
commit
a439cdf22e
4 changed files with 64 additions and 7 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue