12 #ifndef ROOT_TAtomicCountGcc 13 #define ROOT_TAtomicCountGcc 31 #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 2) || \ 32 (defined(__APPLE_CC__) && __APPLE_CC__ > 5000 && !defined(MAC_OS_X_VERSION_10_6)) 33 #include <bits/atomicity.h> 35 #include <ext/atomicity.h> 38 #if defined(__GLIBCXX__) // g++ 3.4+ 40 using __gnu_cxx::__atomic_add;
41 using __gnu_cxx::__exchange_and_add;
57 operator long()
const {
return __exchange_and_add(&fCnt, 0); }
60 #ifdef _GLIBCXX_WRITE_MEM_BARRIER 61 #if !(defined(__INTEL_COMPILER) && defined(__ia64__)) //ICC doesn't support inline asm on IA-64 62 _GLIBCXX_WRITE_MEM_BARRIER;
66 Long_t Get()
const {
return __exchange_and_add(&fCnt, 0); }
TAtomicCount & operator=(const TAtomicCount &)
TAtomicCount(const TAtomicCount &)