1 #ifndef PROTON_ACTOMIC_HEADER
2 #define PROTON_ACTOMIC_HEADER
14 explicit atomic_count(
long v ) : value_( v ) {}
18 return atomic_exchange_and_add( &value_, +1 ) + 1;
23 return atomic_exchange_and_add( &value_, -1 ) - 1;
28 return atomic_exchange_and_add( &value_, 0 );
33 atomic_count(atomic_count
const &);
34 atomic_count & operator=(atomic_count
const &);
40 static long atomic_inc(
long * pw,
long dv )
52 "+m"( *pw ),
"=r"( r ):
65 #endif // PROTON_ACTOMIC_HEADER