2 #if defined (ACE_HAS_GCC_ATOMIC_BUILTINS) && (ACE_HAS_GCC_ATOMIC_BUILTINS == 1)
4 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
8 ACE_Atomic_Op_GCC<T>::ACE_Atomic_Op_GCC (void)
15 ACE_Atomic_Op_GCC<T>::ACE_Atomic_Op_GCC (T c)
22 ACE_Atomic_Op_GCC<T>::ACE_Atomic_Op_GCC (
23 const ACE_Atomic_Op_GCC<T> &rhs)
30 ACE_Atomic_Op_GCC<T>::operator++ (void)
32 return __sync_add_and_fetch (&this->value_, 1);
37 ACE_Atomic_Op_GCC<T>::operator++ (int)
39 return __sync_fetch_and_add (&this->value_, 1);
44 ACE_Atomic_Op_GCC<T>::operator-- (void)
46 return __sync_sub_and_fetch (&this->value_, 1);
51 ACE_Atomic_Op_GCC<T>::operator-- (int)
53 return __sync_fetch_and_sub (&this->value_, 1);
58 ACE_Atomic_Op_GCC<T>::operator+= (T rhs)
60 return __sync_add_and_fetch (&this->value_, rhs);
65 ACE_Atomic_Op_GCC<T>::operator-= (T rhs)
67 return __sync_sub_and_fetch (&this->value_, rhs);
72 ACE_Atomic_Op_GCC<T>::operator== (T rhs) const
74 return (this->value_ == rhs);
79 ACE_Atomic_Op_GCC<T>::operator!= (T rhs) const
81 return (this->value_ != rhs);
86 ACE_Atomic_Op_GCC<T>::operator>= (T rhs) const
88 return (this->value_ >= rhs);
93 ACE_Atomic_Op_GCC<T>::operator> (T rhs) const
95 return (this->value_ > rhs);
100 ACE_Atomic_Op_GCC<T>::operator<= (T rhs) const
102 return (this->value_ <= rhs);
105 template <typename T>
107 ACE_Atomic_Op_GCC<T>::operator< (T rhs) const
109 return (this->value_ < rhs);
112 template <typename T>
113 ACE_INLINE ACE_Atomic_Op_GCC<T> &
114 ACE_Atomic_Op_GCC<T>::operator= (T rhs)
116 (void) __sync_lock_test_and_set (&this->value_, rhs);
120 template <typename T>
121 ACE_INLINE ACE_Atomic_Op_GCC<T> &
122 ACE_Atomic_Op_GCC<T>::operator= (
123 const ACE_Atomic_Op_GCC<T> &rhs)
125 (void) __sync_lock_test_and_set (&this->value_, rhs.value_);
129 template <typename T>
131 ACE_Atomic_Op_GCC<T>::exchange (T newval)
133 return __sync_val_compare_and_swap (&this->value_, this->value_, newval);
136 template <typename T>
138 ACE_Atomic_Op_GCC<T>::value (void) const
143 template <typename T>
144 ACE_INLINE volatile T &
145 ACE_Atomic_Op_GCC<T>::value_i (void)
150 ACE_END_VERSIONED_NAMESPACE_DECL
152 #endif /* ACE_HAS_GCC_ATOMIC_BUILTINS */