# include "acconfig.h"
#endif
+
+
#ifdef WITH_CCGNU
/*
* use commonc++ library AtomicCounter.
*/
# include "cc++/thread.h"
+namespace ceph {
+
class atomic_t {
mutable ost::AtomicCounter nref; // mutable for const-ness of operator<<
public:
void sub(int i) { nref -= i; }
};
+}
+
#else
/*
* crappy slow implementation that uses a pthreads spinlock.
*/
#include "common/Spinlock.h"
+namespace ceph {
+
class atomic_t {
Spinlock lock;
long nref;
}
};
+}
+
#endif
#endif