mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-20 16:25:45 +00:00
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.
This commit is contained in:
parent
53d3082dd4
commit
0f347eaf52
1 changed files with 1 additions and 1 deletions
|
@ -422,7 +422,7 @@ private:
|
||||||
bool is_64bit_process = true;
|
bool is_64bit_process = true;
|
||||||
|
|
||||||
/// Total running time for the process in ticks.
|
/// 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.
|
/// Per-process handle table for storing created object handles in.
|
||||||
KHandleTable handle_table;
|
KHandleTable handle_table;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue