mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2025-06-17 06:08:06 -05:00
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:
committed by
FernandoS27
parent
82218c925a
commit
103f3a2fe5
@ -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);
|
||||
|
Reference in New Issue
Block a user