From c28a802df873c2b3f66aba9f3d53d80447ab21a8 Mon Sep 17 00:00:00 2001 From: Radoslaw Zarzynski Date: Wed, 29 Jan 2020 21:15:55 +0100 Subject: [PATCH] include: switch mempool.h to ceph::atomic. Signed-off-by: Radoslaw Zarzynski --- src/include/mempool.h | 12 ++++++------ src/osd/PeeringState.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/include/mempool.h b/src/include/mempool.h index 155ec18d43824..8027305688d20 100644 --- a/src/include/mempool.h +++ b/src/include/mempool.h @@ -22,12 +22,12 @@ #include #include #include -#include #include #include #include -#include +#include "common/Formatter.h" +#include "common/ceph_atomic.h" #include "include/ceph_assert.h" #include "include/compact_map.h" #include "include/compact_set.h" @@ -194,9 +194,9 @@ enum { // align shard to a cacheline struct shard_t { - std::atomic bytes = {0}; - std::atomic items = {0}; - char __padding[128 - sizeof(std::atomic)*2]; + ceph::atomic bytes = {0}; + ceph::atomic items = {0}; + char __padding[128 - sizeof(ceph::atomic)*2]; } __attribute__ ((aligned (128))); static_assert(sizeof(shard_t) == 128, "shard_t should be cacheline-sized"); @@ -222,7 +222,7 @@ const char *get_pool_name(pool_index_t ix); struct type_t { const char *type_name; size_t item_size; - std::atomic items = {0}; // signed + ceph::atomic items = {0}; // signed }; struct type_info_hash { diff --git a/src/osd/PeeringState.h b/src/osd/PeeringState.h index a9bccea5d4489..327e35eeb975a 100644 --- a/src/osd/PeeringState.h +++ b/src/osd/PeeringState.h @@ -1455,7 +1455,7 @@ public: set might_have_unfound; bool deleting = false; /// true while in removing or OSD is shutting down - atomic deleted = {false}; /// true once deletion complete + std::atomic deleted = {false}; /// true once deletion complete MissingLoc missing_loc; ///< information about missing objects -- 2.39.5