hle: kernel: process: Add schedule count tracking, to be used for yield impl.
This commit is contained in:
parent
493263f415
commit
d58a609ae4
@ -216,6 +216,16 @@ public:
|
|||||||
total_process_running_time_ticks += ticks;
|
total_process_running_time_ticks += ticks;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Gets the process schedule count, used for thread yelding
|
||||||
|
constexpr s64 GetScheduledCount() const {
|
||||||
|
return schedule_count;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Increments the process schedule count, used for thread yielding.
|
||||||
|
constexpr void IncrementScheduledCount() {
|
||||||
|
++schedule_count;
|
||||||
|
}
|
||||||
|
|
||||||
/// Gets 8 bytes of random data for svcGetInfo RandomEntropy
|
/// Gets 8 bytes of random data for svcGetInfo RandomEntropy
|
||||||
u64 GetRandomEntropy(std::size_t index) const {
|
u64 GetRandomEntropy(std::size_t index) const {
|
||||||
return random_entropy.at(index);
|
return random_entropy.at(index);
|
||||||
@ -397,6 +407,9 @@ private:
|
|||||||
/// Name of this process
|
/// Name of this process
|
||||||
std::string name;
|
std::string name;
|
||||||
|
|
||||||
|
/// Schedule count of this process
|
||||||
|
s64 schedule_count{};
|
||||||
|
|
||||||
/// System context
|
/// System context
|
||||||
Core::System& system;
|
Core::System& system;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user