]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/common/WorkQueue.h
update sources to v12.1.0
[ceph.git] / ceph / src / common / WorkQueue.h
index 6e29da6fd380b6a4cd44d310bc3720d9edafe4e6..c817e74ec0920201ef88199ff42750b284823f17 100644 (file)
 #ifndef CEPH_WORKQUEUE_H
 #define CEPH_WORKQUEUE_H
 
-#include "Mutex.h"
 #include "Cond.h"
-#include "Thread.h"
 #include "include/unordered_map.h"
-#include "common/config_obs.h"
 #include "common/HeartbeatMap.h"
 
+#include <atomic>
+
 class CephContext;
 
 /// Pool of threads that share work submitted to multiple work queues.
@@ -623,9 +622,11 @@ class ShardedThreadPool {
   Cond shardedpool_cond;
   Cond wait_cond;
   uint32_t num_threads;
-  atomic_t stop_threads;
-  atomic_t pause_threads;
-  atomic_t drain_threads;
+
+  std::atomic<bool> stop_threads = { false };
+  std::atomic<bool> pause_threads = { false };
+  std::atomic<bool> drain_threads = { false };
+
   uint32_t num_paused;
   uint32_t num_drained;