Kernel: Preempt Single core on redudant yields.

This commit is contained in:
Fernando Sahmkow 2020-03-10 13:13:39 -04:00
parent a439cdf22e
commit d494b074e8
6 changed files with 42 additions and 21 deletions

View file

@ -45,6 +45,8 @@ public:
std::function<void(void*)> GetSuspendThreadStartFunc();
void* GetStartFuncParamater();
void PreemptSingleCore();
std::size_t CurrentCore() const {
return current_core.load();
}
@ -71,8 +73,6 @@ private:
void RunThread(std::size_t core);
void PreemptSingleCore();
struct CoreData {
std::shared_ptr<Common::Fiber> host_context;
std::unique_ptr<Common::Event> enter_barrier;