12 #ifndef ROOT_TWin32AtomicCount
13 #define ROOT_TWin32AtomicCount
26 #ifndef ROOT_TAtomicCount
27 #error "Do not use TWin32AtomicCount.h directly. #include \"TAtomicCount.h\" instead."
28 #endif // ROOT_TAtomicCount
36 TAtomicCount(
const TAtomicCount &);
37 TAtomicCount &operator=(
const TAtomicCount &);
40 explicit TAtomicCount(Long_t v) : fCnt(v) { }
41 void operator++() { InterlockedIncrement(&fCnt); }
42 Long_t operator--() {
return InterlockedDecrement(&fCnt); }
43 operator long()
const {
return static_cast<long const volatile &
>(fCnt); }
44 void Set(Long_t v) { fCnt = v; }
45 Long_t Get()
const {
return static_cast<long const volatile &
>(fCnt); }