mirror of
https://github.com/plasma-umass/coz.git
synced 2024-10-26 07:39:17 +03:00
Use atomics and size_t
Using atomics here is essential because this variable may be modified in parallel by different threads.
This commit is contained in:
parent
9272e84b87
commit
2e2daea263
@ -227,7 +227,7 @@ private:
|
|||||||
spinlock _latency_points_lock; //< Spinlock that protects the latency points map
|
spinlock _latency_points_lock; //< Spinlock that protects the latency points map
|
||||||
|
|
||||||
static_map<pid_t, thread_state> _thread_states; //< Map from thread IDs to thread-local state
|
static_map<pid_t, thread_state> _thread_states; //< Map from thread IDs to thread-local state
|
||||||
uint64_t _num_threads_running; //< Number of threads that are currently being sampled
|
std::atomic<size_t> _num_threads_running; //< Number of threads that are currently being sampled
|
||||||
|
|
||||||
std::atomic<bool> _experiment_active; //< Is an experiment running?
|
std::atomic<bool> _experiment_active; //< Is an experiment running?
|
||||||
std::atomic<size_t> _global_delay; //< The global delay time required
|
std::atomic<size_t> _global_delay; //< The global delay time required
|
||||||
|
Loading…
Reference in New Issue
Block a user