atomic_t: Remove (never used) unstable commonc++-based version

This commit is contained in:
Greg Farnum 2010-04-14 13:05:03 -07:00
parent 69b849c4bd
commit d1d6da3b4b
2 changed files with 0 additions and 48 deletions

View File

@ -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])],

View File

@ -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