diff options
author | lat9nq <lat9nq@gmail.com> | 2022-04-01 18:40:52 -0400 |
---|---|---|
committer | lat9nq <lat9nq@gmail.com> | 2022-04-03 21:47:57 -0400 |
commit | d6a0666268d5ef51936c2475d33ab37ff14462e4 (patch) | |
tree | a6410fdd2b4c76de6c4aa8f596b88c2ac18069b2 /src | |
parent | 5b5a1b7fa7470bd32b5481ae6a6cf5f4b07c80c8 (diff) |
k_process: Fix data race
TSan reported a race between thread 36 and thread 34, a read at :225 and
a write at :225 respectively. Make total_proces_running_time_ticks
atomic to avoid this race.
Diffstat (limited to 'src')
-rw-r--r-- | src/core/hle/kernel/k_process.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/hle/kernel/k_process.h b/src/core/hle/kernel/k_process.h index 48b17fc74..9f171e3da 100644 --- a/src/core/hle/kernel/k_process.h +++ b/src/core/hle/kernel/k_process.h @@ -422,7 +422,7 @@ private: bool is_64bit_process = true; /// Total running time for the process in ticks. - u64 total_process_running_time_ticks = 0; + std::atomic<u64> total_process_running_time_ticks = 0; /// Per-process handle table for storing created object handles in. KHandleTable handle_table; |