summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/thread.h
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2019-09-11 18:14:37 +0200
committerFernandoS27 <fsahmkow27@gmail.com>2019-10-15 17:55:16 +0200
commit0cf26cee593c3c6abe909f3db52d972f846b13a9 (patch)
tree6e8e4b08271d1c3bd2348ef2bdd3cf5c4912dc9f /src/core/hle/kernel/thread.h
parentScheduler: Corrections to YieldAndBalanceLoad and Yield bombing protection. (diff)
downloadyuzu-0cf26cee593c3c6abe909f3db52d972f846b13a9.tar
yuzu-0cf26cee593c3c6abe909f3db52d972f846b13a9.tar.gz
yuzu-0cf26cee593c3c6abe909f3db52d972f846b13a9.tar.bz2
yuzu-0cf26cee593c3c6abe909f3db52d972f846b13a9.tar.lz
yuzu-0cf26cee593c3c6abe909f3db52d972f846b13a9.tar.xz
yuzu-0cf26cee593c3c6abe909f3db52d972f846b13a9.tar.zst
yuzu-0cf26cee593c3c6abe909f3db52d972f846b13a9.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/kernel/thread.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/core/hle/kernel/thread.h b/src/core/hle/kernel/thread.h
index 88255099f..bec23a0e0 100644
--- a/src/core/hle/kernel/thread.h
+++ b/src/core/hle/kernel/thread.h
@@ -416,6 +416,14 @@ public:
/// Yields this thread and if the core is left idle, loads are rebalanced
bool YieldAndWaitForLoadBalancing();
+ void IncrementYieldCount() {
+ yield_count++;
+ }
+
+ u64 GetYieldCount() const {
+ return yield_count;
+ }
+
ThreadSchedStatus GetSchedulingStatus() const {
return static_cast<ThreadSchedStatus>(scheduling_state & ThreadSchedMasks::LowMask);
}
@@ -460,6 +468,7 @@ private:
u64 total_cpu_time_ticks = 0; ///< Total CPU running ticks.
u64 last_running_ticks = 0; ///< CPU tick when thread was last running
+ u64 yield_count = 0; ///< Number of innecessaries yields occured.
s32 processor_id = 0;