Scheduler: Add protections for Yield bombing
In case of redundant yields, the scheduler will now idle the core for it's timeslice, in order to avoid continuously yielding the same thing over and over.
This commit is contained in:
parent
82218c925a
commit
103f3a2fe5
5 changed files with 31 additions and 24 deletions
|
@ -408,13 +408,13 @@ public:
|
|||
void Sleep(s64 nanoseconds);
|
||||
|
||||
/// Yields this thread without rebalancing loads.
|
||||
void YieldSimple();
|
||||
bool YieldSimple();
|
||||
|
||||
/// Yields this thread and does a load rebalancing.
|
||||
void YieldAndBalanceLoad();
|
||||
bool YieldAndBalanceLoad();
|
||||
|
||||
/// Yields this thread and if the core is left idle, loads are rebalanced
|
||||
void YieldAndWaitForLoadBalancing();
|
||||
bool YieldAndWaitForLoadBalancing();
|
||||
|
||||
ThreadSchedStatus GetSchedulingStatus() const {
|
||||
return static_cast<ThreadSchedStatus>(scheduling_state & ThreadSchedMasks::LowMask);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue