From: Kefu Chai Date: Thu, 8 Jun 2017 03:32:02 +0000 (+0800) Subject: rgw: rgw_rados: s/atomic_t/atomic<>/ X-Git-Tag: v12.1.0~209^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a3a958fa43ce8134a9c094c55ff5fef093084f39;p=ceph.git rgw: rgw_rados: s/atomic_t/atomic<>/ Signed-off-by: Kefu Chai --- diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index 88f198d3ce8b..74061eeb212b 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -72,8 +72,6 @@ using namespace librados; #include "compressor/Compressor.h" -#include - #define dout_context g_ceph_context #define dout_subsys ceph_subsys_rgw @@ -3488,7 +3486,7 @@ class RGWIndexCompletionManager { int num_shards; - atomic_t cur_shard; + std::atomic cur_shard; public: @@ -3512,8 +3510,8 @@ public: } int next_shard() { - int result = cur_shard.read() % num_shards; - cur_shard.inc(); + int result = cur_shard % num_shards; + cur_shard++; return result; }