From: Jesse Williamson Date: Wed, 26 Apr 2017 12:26:38 +0000 (-0700) Subject: rgw: migrate atomic_t to std::atomic<> X-Git-Tag: v12.1.0~10^2~41^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ec4f4c8a64202827c968128fcb83591e959854cf;p=ceph.git rgw: migrate atomic_t to std::atomic<> Signed-off-by: Jesse Williamson --- diff --git a/src/rgw/rgw_loadgen_process.cc b/src/rgw/rgw_loadgen_process.cc index 23e6fefca73e..fef37f805bac 100644 --- a/src/rgw/rgw_loadgen_process.cc +++ b/src/rgw/rgw_loadgen_process.cc @@ -39,7 +39,7 @@ void RGWLoadGenProcess::run() vector buckets(num_buckets); - std::atomic failed = { 0 }; + std::atomic failed = { false }; for (i = 0; i < num_buckets; i++) { buckets[i] = "/loadgen"; @@ -104,7 +104,7 @@ done: void RGWLoadGenProcess::gen_request(const string& method, const string& resource, - int content_length, std::atomic* fail_flag) + int content_length, std::atomic* fail_flag) { RGWLoadGenRequest* req = new RGWLoadGenRequest(store->get_new_req_id(), method, resource, diff --git a/src/rgw/rgw_object_expirer_core.h b/src/rgw/rgw_object_expirer_core.h index 6fe8d1410bff..813eca3f939a 100644 --- a/src/rgw/rgw_object_expirer_core.h +++ b/src/rgw/rgw_object_expirer_core.h @@ -4,11 +4,11 @@ #ifndef CEPH_OBJEXP_H #define CEPH_OBJEXP_H -#include -#include -#include -#include #include +#include +#include +#include +#include #include "auth/Crypto.h" @@ -38,8 +38,6 @@ #include "rgw_usage.h" #include "rgw_replica_log.h" -#include - class RGWObjectExpirer { protected: RGWRados *store; diff --git a/src/rgw/rgw_process.h b/src/rgw/rgw_process.h index 005f2db6fef7..3aaeaff61afb 100644 --- a/src/rgw/rgw_process.h +++ b/src/rgw/rgw_process.h @@ -184,7 +184,7 @@ public: void checkpoint(); void handle_request(RGWRequest* req) override; void gen_request(const string& method, const string& resource, - int content_length, std::atomic* fail_flag); + int content_length, std::atomic* fail_flag); void set_access_key(RGWAccessKey& key) { access_key = key; } }; diff --git a/src/rgw/rgw_request.h b/src/rgw/rgw_request.h index 3c835f7b1c94..11345bb0d230 100644 --- a/src/rgw/rgw_request.h +++ b/src/rgw/rgw_request.h @@ -59,10 +59,10 @@ struct RGWLoadGenRequest : public RGWRequest { string method; string resource; int content_length; - std::atomic* fail_flag = nullptr; + std::atomic* fail_flag = nullptr; RGWLoadGenRequest(uint64_t req_id, const string& _m, const string& _r, int _cl, - std::atomic *ff) + std::atomic *ff) : RGWRequest(req_id), method(_m), resource(_r), content_length(_cl), fail_flag(ff) {} };