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
commit103f3a2fe51a09caf3f478226b6957b23c6eff79 (patch)
tree5304773e043ed3db6a55e4666fc25143560396af /src/core/hle/kernel/thread.h
parent82218c925af8bcbaa05ae9f39af2d2393de7681f (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 bf0cae959..88255099f 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);