diff options
author | 2024-09-19 13:29:47 +0100 | |
---|---|---|
committer | 2024-09-23 10:31:49 +0000 | |
commit | 91f44f6bfe830c5d35ea8045c308092ffc0c91d4 (patch) | |
tree | 87ff04768b62269ba01f9a19fea035eeb7598be5 /runtime/thread_pool.h | |
parent | 56d62450fcd69434b94158a42f1a195bd7ee858b (diff) |
Update volatile variables to C++20
This gets rid of the -Wdeprecated-volatile warnings. More info in the
proposal: https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1152r4.html
The bool ones weren't causing warnings but we might as well clean
them up in this CL too.
Bug: 368241186
Test: art/test/testrunner/testrunner.py --host --64 --optimizing -b
Change-Id: Iddb60c2fe600ef27f29c943b3b669171e7f9aed3
Diffstat (limited to 'runtime/thread_pool.h')
-rw-r--r-- | runtime/thread_pool.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/runtime/thread_pool.h b/runtime/thread_pool.h index 6d176546c3..96317ad13d 100644 --- a/runtime/thread_pool.h +++ b/runtime/thread_pool.h @@ -192,10 +192,10 @@ class AbstractThreadPool { Mutex task_queue_lock_; ConditionVariable task_queue_condition_ GUARDED_BY(task_queue_lock_); ConditionVariable completion_condition_ GUARDED_BY(task_queue_lock_); - volatile bool started_ GUARDED_BY(task_queue_lock_); - volatile bool shutting_down_ GUARDED_BY(task_queue_lock_); + bool started_ GUARDED_BY(task_queue_lock_); + bool shutting_down_ GUARDED_BY(task_queue_lock_); // How many worker threads are waiting on the condition. - volatile size_t waiting_count_ GUARDED_BY(task_queue_lock_); + size_t waiting_count_ GUARDED_BY(task_queue_lock_); std::vector<ThreadPoolWorker*> threads_; // Work balance detection. uint64_t start_time_ GUARDED_BY(task_queue_lock_); |