summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/process.h
diff options
context:
space:
mode:
authorGravatar Lioncash2018-10-25 18:42:50 -0400
committerGravatar Lioncash2018-10-26 12:49:11 -0400
commit6594853eb112f265fe2354723160c0d4e1cb761a (patch)
tree60e67d4d7f38d8f1fe5bebe01f3ef0d87881c570 /src/core/hle/kernel/process.h
parentMerge pull request #1533 from FernandoS27/lmem (diff)
downloadyuzu-6594853eb112f265fe2354723160c0d4e1cb761a.tar.gz
yuzu-6594853eb112f265fe2354723160c0d4e1cb761a.tar.xz
yuzu-6594853eb112f265fe2354723160c0d4e1cb761a.zip
svc: Implement svcGetInfo command 0xF0000002
This retrieves: if (curr_thread == handle_thread) { result = total_thread_ticks + (hardware_tick_count - last_context_switch_ticks); } else if (curr_thread == handle_thread && sub_id == current_core_index) { result = hardware_tick_count - last_context_switch_ticks; }
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 148478488..8d2616c79 100644
--- a/src/core/hle/kernel/process.h
+++ b/src/core/hle/kernel/process.h
@@ -202,6 +202,16 @@ public:
202 return is_64bit_process; 202 return is_64bit_process;
203 } 203 }
204 204
205 /// Gets the total running time of the process instance in ticks.
206 u64 GetCPUTimeTicks() const {
207 return total_process_running_time_ticks;
208 }
209
210 /// Updates the total running time, adding the given ticks to it.
211 void UpdateCPUTimeTicks(u64 ticks) {
212 total_process_running_time_ticks += ticks;
213 }
214
205 /** 215 /**
206 * Loads process-specifics configuration info with metadata provided 216 * Loads process-specifics configuration info with metadata provided
207 * by an executable. 217 * by an executable.
@@ -305,6 +315,9 @@ private:
305 /// specified by metadata provided to the process during loading. 315 /// specified by metadata provided to the process during loading.
306 bool is_64bit_process = true; 316 bool is_64bit_process = true;
307 317
318 /// Total running time for the process in ticks.
319 u64 total_process_running_time_ticks = 0;
320
308 /// Per-process handle table for storing created object handles in. 321 /// Per-process handle table for storing created object handles in.
309 HandleTable handle_table; 322 HandleTable handle_table;
310 323