From d1d6da3b4b99718f5222172efee0231092e88af2 Mon Sep 17 00:00:00 2001 From: Greg Farnum Date: Wed, 14 Apr 2010 13:05:03 -0700 Subject: [PATCH] atomic_t: Remove (never used) unstable commonc++-based version --- configure.ac | 21 --------------------- src/include/atomic.h | 27 --------------------------- 2 files changed, 48 deletions(-) diff --git a/configure.ac b/configure.ac index 665fcdd6281..ee49113b305 100644 --- a/configure.ac +++ b/configure.ac @@ -96,27 +96,6 @@ AS_IF([test "x$with_hadoop" != xno], ])]) AM_CONDITIONAL(WITH_HADOOPCLIENT, [test "$HAVE_JNI" = "1"]) -# CommonC++? -AC_ARG_WITH([ccgnu], - [AS_HELP_STRING([--with-ccgnu], - [use CommonC++ library for fast thread-safe reference counting])], - [], - [with_ccgnu=check]) -LIBCCGNU2= -AS_IF([test "x$with_ccgnu" == xyes], - [AC_CHECK_LIB([ccgnu2], [main], - [AC_SUBST([LIBCCGNU2], ["-lccgnu2"]) - AC_DEFINE([WITH_CCGNU], [1], - [Define if you have ccgnu]) - LIBS="-lccgnu2 -ldl $LIBS" - ], - [if test "x$with_ccgnu" != xcheck; then - AC_MSG_FAILURE( - [--with-ccgnu was given but test failed]) - fi - ], [-ldl])]) -AM_CONDITIONAL(WITH_CCGNU, test "WITH_CCGNU" = "1") - # newsyn? requires mpi. #AC_ARG_WITH([newsyn], # [AS_HELP_STRING([--with-newsyn], [build newsyn target requires mpi])], diff --git a/src/include/atomic.h b/src/include/atomic.h index 18c10c0e64a..95a9f486d98 100644 --- a/src/include/atomic.h +++ b/src/include/atomic.h @@ -19,30 +19,6 @@ # 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: - atomic_t(int i=0) : nref(i) {} - void inc() { ++nref; } - int dec() { return --nref; } - int test() const { return nref; } - void add(int i) { nref += i; } - void sub(int i) { nref -= i; } -}; - -} - -#else /* * crappy slow implementation that uses a pthreads spinlock. */ @@ -86,7 +62,4 @@ public: }; } - -#endif - #endif