summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/process.h
diff options
context:
space:
mode:
authorGravatar bunnei2020-12-20 20:57:54 -0800
committerGravatar GitHub2020-12-20 20:57:54 -0800
commit1279c7ce7afd3d1bf2b4e33aa922158acf2cd060 (patch)
tree6db8088caed2bd957187e4730f51424325038fa5 /src/core/hle/kernel/process.h
parentMerge pull request #5201 from ameerj/bufferq-refactor (diff)
parenthle: kernel: Process: Various style fixes based on code review feedback. (diff)
downloadyuzu-1279c7ce7afd3d1bf2b4e33aa922158acf2cd060.tar.gz
yuzu-1279c7ce7afd3d1bf2b4e33aa922158acf2cd060.tar.xz
yuzu-1279c7ce7afd3d1bf2b4e33aa922158acf2cd060.zip
Merge pull request #5131 from bunnei/scheduler-rewrite
Rewrite Kernel scheduler based on Atmosphere
Diffstat (limited to 'src/core/hle/kernel/process.h')
-rw-r--r--src/core/hle/kernel/process.h13
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..e412e58aa 100644
--- a/src/core/hle/kernel/process.h
+++ b/src/core/hle/kernel/process.h
@@ -216,6 +216,16 @@ public:
216 total_process_running_time_ticks += ticks; 216 total_process_running_time_ticks += ticks;
217 } 217 }
218 218
219 /// Gets the process schedule count, used for thread yelding
220 s64 GetScheduledCount() const {
221 return schedule_count;
222 }
223
224 /// Increments the process schedule count, used for thread yielding.
225 void IncrementScheduledCount() {
226 ++schedule_count;
227 }
228
219 /// Gets 8 bytes of random data for svcGetInfo RandomEntropy 229 /// Gets 8 bytes of random data for svcGetInfo RandomEntropy
220 u64 GetRandomEntropy(std::size_t index) const { 230 u64 GetRandomEntropy(std::size_t index) const {
221 return random_entropy.at(index); 231 return random_entropy.at(index);
@@ -397,6 +407,9 @@ private:
397 /// Name of this process 407 /// Name of this process
398 std::string name; 408 std::string name;
399 409
410 /// Schedule count of this process
411 s64 schedule_count{};
412
400 /// System context 413 /// System context
401 Core::System& system; 414 Core::System& system;
402}; 415};