summaryrefslogtreecommitdiff
path: root/ace/Atomic_Op.i
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2004-06-16 07:58:09 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2004-06-16 07:58:09 +0000
commit5db6a116406b02ad826677d56474373139b5e461 (patch)
treea52a3ebe70100dd6ee98945618918994ed8f30cc /ace/Atomic_Op.i
parent393a25f7bd25beca509700ba1a568442c1a0921c (diff)
downloadATCD-5db6a116406b02ad826677d56474373139b5e461.tar.gz
ChangeLogTag: Wed Jun 16 07:56:12 UTC 2004 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'ace/Atomic_Op.i')
-rw-r--r--ace/Atomic_Op.i150
1 files changed, 0 insertions, 150 deletions
diff --git a/ace/Atomic_Op.i b/ace/Atomic_Op.i
deleted file mode 100644
index 6194d8a7318..00000000000
--- a/ace/Atomic_Op.i
+++ /dev/null
@@ -1,150 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-
-
-#if defined (ACE_HAS_BUILTIN_ATOMIC_OP)
-
-ACE_INLINE
-ACE_Atomic_Op<ACE_Thread_Mutex, long>::ACE_Atomic_Op (void)
- : value_ (0)
-{
-}
-
-ACE_INLINE
-ACE_Atomic_Op<ACE_Thread_Mutex, long>::ACE_Atomic_Op (long c)
- : value_ (c)
-{
-}
-
-ACE_INLINE
-ACE_Atomic_Op<ACE_Thread_Mutex, long>::ACE_Atomic_Op (
- const ACE_Atomic_Op<ACE_Thread_Mutex, long> &rhs)
- : value_ (rhs.value_)
-{
-}
-
-ACE_INLINE long
-ACE_Atomic_Op<ACE_Thread_Mutex, long>::operator++ (void)
-{
-#if defined (WIN32)
- return ::InterlockedIncrement (const_cast<long *> (&this->value_));
-#else /* WIN32 */
- return (*increment_fn_) (&this->value_);
-#endif /* WIN32 */
-}
-
-ACE_INLINE long
-ACE_Atomic_Op<ACE_Thread_Mutex, long>::operator++ (int)
-{
- return ++*this - 1;
-}
-
-ACE_INLINE long
-ACE_Atomic_Op<ACE_Thread_Mutex, long>::operator-- (void)
-{
-#if defined (WIN32)
- return ::InterlockedDecrement (const_cast<long *> (&this->value_));
-#else /* WIN32 */
- return (*decrement_fn_) (&this->value_);
-#endif /* WIN32 */
-}
-
-ACE_INLINE long
-ACE_Atomic_Op<ACE_Thread_Mutex, long>::operator-- (int)
-{
- return --*this + 1;
-}
-
-ACE_INLINE long
-ACE_Atomic_Op<ACE_Thread_Mutex, long>::operator+= (long rhs)
-{
-#if defined (WIN32) && defined (ACE_HAS_INTERLOCKED_EXCHANGEADD)
- return ::InterlockedExchangeAdd (const_cast<long *> (&this->value_),
- rhs) + rhs;
-#else /* WIN32 && ACE_HAS_INTERLOCKED_EXCHANGEADD */
- return (*exchange_add_fn_) (&this->value_, rhs) + rhs;
-#endif /* WIN32 && ACE_HAS_INTERLOCKED_EXCHANGEADD */
-}
-
-ACE_INLINE long
-ACE_Atomic_Op<ACE_Thread_Mutex, long>::operator-= (long rhs)
-{
-#if defined (WIN32) && defined (ACE_HAS_INTERLOCKED_EXCHANGEADD)
- return ::InterlockedExchangeAdd (const_cast<long *> (&this->value_),
- -rhs) - rhs;
-#else /* WIN32 && ACE_HAS_INTERLOCKED_EXCHANGEADD */
- return (*exchange_add_fn_) (&this->value_, -rhs) - rhs;
-#endif /* WIN32 && ACE_HAS_INTERLOCKED_EXCHANGEADD */
-}
-
-ACE_INLINE bool
-ACE_Atomic_Op<ACE_Thread_Mutex, long>::operator== (long rhs) const
-{
- return (this->value_ == rhs);
-}
-
-ACE_INLINE bool
-ACE_Atomic_Op<ACE_Thread_Mutex, long>::operator!= (long rhs) const
-{
- return (this->value_ != rhs);
-}
-
-ACE_INLINE bool
-ACE_Atomic_Op<ACE_Thread_Mutex, long>::operator>= (long rhs) const
-{
- return (this->value_ >= rhs);
-}
-
-ACE_INLINE bool
-ACE_Atomic_Op<ACE_Thread_Mutex, long>::operator> (long rhs) const
-{
- return (this->value_ > rhs);
-}
-
-ACE_INLINE bool
-ACE_Atomic_Op<ACE_Thread_Mutex, long>::operator<= (long rhs) const
-{
- return (this->value_ <= rhs);
-}
-
-ACE_INLINE bool
-ACE_Atomic_Op<ACE_Thread_Mutex, long>::operator< (long rhs) const
-{
- return (this->value_ < rhs);
-}
-
-ACE_INLINE void
-ACE_Atomic_Op<ACE_Thread_Mutex, long>::operator= (long rhs)
-{
-#if defined (WIN32)
- ::InterlockedExchange (const_cast<long *> (&this->value_), rhs);
-#else /* WIN32 */
- (*exchange_fn_) (&this->value_, rhs);
-#endif /* WIN32 */
-}
-
-ACE_INLINE void
-ACE_Atomic_Op<ACE_Thread_Mutex, long>::operator= (
- const ACE_Atomic_Op<ACE_Thread_Mutex, long> &rhs)
-{
-#if defined (WIN32)
- ::InterlockedExchange (const_cast<long *> (&this->value_), rhs.value_);
-#else /* WIN32 */
- (*exchange_fn_) (&this->value_, rhs.value_);
-#endif /* WIN32 */
-}
-
-ACE_INLINE long
-ACE_Atomic_Op<ACE_Thread_Mutex, long>::value (void) const
-{
- return this->value_;
-}
-
-ACE_INLINE volatile long &
-ACE_Atomic_Op<ACE_Thread_Mutex, long>::value_i (void)
-{
- return this->value_;
-}
-
-#endif /* ACE_HAS_BUILTIN_ATOMIC_OP */