mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2025-06-17 06:18:31 -05:00
Scheduler: Implement Yield Count and Core migration on Thread Preemption.
This commit is contained in:
committed by
FernandoS27
parent
2d382de6fa
commit
0cf26cee59
@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user