]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
client: s/atomic_t/std::atomic<>
authorKefu Chai <kchai@redhat.com>
Thu, 8 Jun 2017 04:18:42 +0000 (12:18 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 8 Jun 2017 04:21:00 +0000 (12:21 +0800)
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/client/hypertable/CephBroker.cc
src/client/hypertable/CephBroker.h

index 77f6e083419ffab568ac6a137931b35cbab058c1..d7911cbfa97037b8a4fbcec56b1c863c1f04dd06 100644 (file)
@@ -41,7 +41,7 @@
 
 using namespace Hypertable;
 
-atomic_t CephBroker::ms_next_fd = ATOMIC_INIT(0);
+std::atomic<int> CephBroker::ms_next_fd{0};
 
 /* A thread-safe version of strerror */
 static std::string cpp_strerror(int err)
index a0d180c4da28552cbd481fd87ef09a034fe845b1..d2df38909ae8c9f9c3da256a6aa6cc7233212bd4 100644 (file)
@@ -27,9 +27,8 @@
 extern "C" {
 #include <unistd.h>
 }
-
+#include <atomic>
 #include "Common/String.h"
-#include "Common/atomic.h"
 #include "Common/Properties.h"
 
 #include "DfsBroker/Lib/Broker.h"
@@ -97,7 +96,7 @@ namespace Hypertable {
 
   private:
     struct ceph_mount_info *cmount;
-    static atomic_t ms_next_fd;
+    static std::atomic<int> ms_next_fd;
 
     virtual void report_error(ResponseCallback *cb, int error);