#include <vector>
#include <list>
#include <mutex>
-#include <atomic>
#include <typeinfo>
#include <boost/container/flat_set.hpp>
#include <boost/container/flat_map.hpp>
-#include <common/Formatter.h>
+#include "common/Formatter.h"
+#include "common/ceph_atomic.h"
#include "include/ceph_assert.h"
#include "include/compact_map.h"
#include "include/compact_set.h"
// align shard to a cacheline
struct shard_t {
- std::atomic<size_t> bytes = {0};
- std::atomic<size_t> items = {0};
- char __padding[128 - sizeof(std::atomic<size_t>)*2];
+ ceph::atomic<size_t> bytes = {0};
+ ceph::atomic<size_t> items = {0};
+ char __padding[128 - sizeof(ceph::atomic<size_t>)*2];
} __attribute__ ((aligned (128)));
static_assert(sizeof(shard_t) == 128, "shard_t should be cacheline-sized");
struct type_t {
const char *type_name;
size_t item_size;
- std::atomic<ssize_t> items = {0}; // signed
+ ceph::atomic<ssize_t> items = {0}; // signed
};
struct type_info_hash {
set<pg_shard_t> might_have_unfound;
bool deleting = false; /// true while in removing or OSD is shutting down
- atomic<bool> deleted = {false}; /// true once deletion complete
+ std::atomic<bool> deleted = {false}; /// true once deletion complete
MissingLoc missing_loc; ///< information about missing objects