diff options
author | bunnei <bunneidev@gmail.com> | 2020-11-28 20:54:41 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2020-12-06 09:03:24 +0100 |
commit | d58a609ae43d2a1db296e90cb87dcfa3e4d4e7f3 (patch) | |
tree | b233d4ab29bd212320a30e91f17571d5bfe25329 /src/core/hle | |
parent | hle: kernel: svc: Remove unnecessary hack in svcSleep. (diff) | |
download | yuzu-d58a609ae43d2a1db296e90cb87dcfa3e4d4e7f3.tar yuzu-d58a609ae43d2a1db296e90cb87dcfa3e4d4e7f3.tar.gz yuzu-d58a609ae43d2a1db296e90cb87dcfa3e4d4e7f3.tar.bz2 yuzu-d58a609ae43d2a1db296e90cb87dcfa3e4d4e7f3.tar.lz yuzu-d58a609ae43d2a1db296e90cb87dcfa3e4d4e7f3.tar.xz yuzu-d58a609ae43d2a1db296e90cb87dcfa3e4d4e7f3.tar.zst yuzu-d58a609ae43d2a1db296e90cb87dcfa3e4d4e7f3.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/kernel/process.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/core/hle/kernel/process.h b/src/core/hle/kernel/process.h index f45cb5674..36d8547bd 100644 --- a/src/core/hle/kernel/process.h +++ b/src/core/hle/kernel/process.h @@ -216,6 +216,16 @@ public: 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 u64 GetRandomEntropy(std::size_t index) const { return random_entropy.at(index); @@ -397,6 +407,9 @@ private: /// Name of this process std::string name; + /// Schedule count of this process + s64 schedule_count{}; + /// System context Core::System& system; }; |