aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/thread.h
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2019-09-10 10:23:43 -0400
committerFernandoS27 <fsahmkow27@gmail.com>2019-10-15 11:55:13 -0400
commitacdce3b4df6305ecc41647b80177b09a72b2e2aa (patch)
tree5304773e043ed3db6a55e4666fc25143560396af /src/core/hle/kernel/thread.h
parent5130168171d67075b2d64566d6d41bf17985c272 (diff)
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.
Diffstat (limited to 'src/core/hle/kernel/thread.h')
-rw-r--r--src/core/hle/kernel/thread.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/hle/kernel/thread.h b/src/core/hle/kernel/thread.h
index bf0cae959a..88255099f5 100644
--- a/src/core/hle/kernel/thread.h
+++ b/src/core/hle/kernel/thread.h
@@ -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);