]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
atomic: move to ceph namespace
authorSage Weil <sage@newdream.net>
Thu, 8 Apr 2010 16:48:08 +0000 (09:48 -0700)
committerSage Weil <sage@newdream.net>
Thu, 8 Apr 2010 16:48:08 +0000 (09:48 -0700)
src/include/atomic.h

index 9145aeb9e64795e454226514d6996be95bfbf2a0..5cd842e057fd2cd1556d138ac8395a683740abc7 100644 (file)
 # 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:
@@ -36,12 +40,16 @@ 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;
@@ -77,6 +85,8 @@ public:
   }
 };
 
+}
+
 #endif
 
 #endif