diff options
author | bala <bala@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-12-25 05:56:51 +0000 |
---|---|---|
committer | bala <bala@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-12-25 05:56:51 +0000 |
commit | 86e1d61a4262a8673bb7df920a265883bfb9539d (patch) | |
tree | f2aa3cca14e50dc33493d5b655be9a21c613d373 | |
parent | 983ef1600885d022c2996422464f00c83bc8b531 (diff) | |
download | ATCD-86e1d61a4262a8673bb7df920a265883bfb9539d.tar.gz |
ChangeLogTag: Mon Dec 24 23:52:43 2001 Balachandran Natarajan <bala@cs.wustl.edu>
-rw-r--r-- | ChangeLog | 32 | ||||
-rw-r--r-- | ChangeLogs/ChangeLog-02a | 32 | ||||
-rw-r--r-- | ChangeLogs/ChangeLog-03a | 32 | ||||
-rw-r--r-- | ace/Atomic_Op.cpp | 83 | ||||
-rw-r--r-- | ace/Atomic_Op.h | 189 | ||||
-rw-r--r-- | ace/Atomic_Op.i | 8 | ||||
-rw-r--r-- | ace/Functor.h | 78 | ||||
-rw-r--r-- | ace/Functor.i | 38 | ||||
-rw-r--r-- | ace/RMCast/RMCast_Reassembly.cpp | 1 | ||||
-rw-r--r-- | ace/Synch_T.cpp | 70 | ||||
-rw-r--r-- | ace/Synch_T.h | 150 | ||||
-rw-r--r-- | protocols/ace/RMCast/RMCast_Reassembly.cpp | 1 | ||||
-rw-r--r-- | tests/Atomic_Op_Test.cpp | 2 | ||||
-rw-r--r-- | tests/Auto_IncDec_Test.cpp | 6 | ||||
-rw-r--r-- | tests/Cache_Map_Manager_Test.cpp | 2 | ||||
-rw-r--r-- | tests/Future_Set_Test.cpp | 3 | ||||
-rw-r--r-- | tests/Future_Test.cpp | 2 | ||||
-rw-r--r-- | tests/Hash_Map_Bucket_Iterator_Test.cpp | 2 | ||||
-rw-r--r-- | tests/MEM_Stream_Test.cpp | 1 | ||||
-rw-r--r-- | tests/Map_Manager_Test.cpp | 2 | ||||
-rw-r--r-- | tests/Message_Queue_Notifications_Test.cpp | 1 | ||||
-rw-r--r-- | tests/Notify_Performance_Test.cpp | 4 | ||||
-rw-r--r-- | tests/Reactors_Test.cpp | 3 | ||||
-rw-r--r-- | tests/Reader_Writer_Test.cpp | 1 | ||||
-rw-r--r-- | tests/Upgradable_RW_Test.cpp | 1 |
25 files changed, 507 insertions, 237 deletions
diff --git a/ChangeLog b/ChangeLog index 421f08126e1..cc6cbcc1566 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,35 @@ +Mon Dec 24 23:52:43 2001 Balachandran Natarajan <bala@cs.wustl.edu> + + * ace/Synch_T.cpp: + * ace/Synch_T.h: Removed ACE_Atomic_Op to a new file. + + * ace/Atomic_Op.h: + * ace/Atomic_Op.i: + * ace/Atomic_Op.cpp: The class ACE_Atomic_Op is in this file now. + + * ace/Functor.h: + * ace/Functor.i: Added template specializations for some base + types like ACE_UINT16. Thanks to Joe Hoffert for giving the + patches. + + * ace/RMCast/RMCast_Reassembly.cpp: Removed a template + instantation for ACE_Equal_To. + + * tests/Atomic_Op_Test.cpp: + * tests/Auto_IncDec_Test.cpp: + * tests/Cache_Map_Manager_Test.cpp: + * tests/Future_Set_Test.cpp: + * tests/Future_Test.cpp: + * tests/Hash_Map_Bucket_Iterator_Test.cpp: + * tests/MEM_Stream_Test.cpp: + * tests/Map_Manager_Test.cpp: + * tests/Message_Queue_Notifications_Test.cpp: + * tests/Notify_Performance_Test.cpp: + * tests/Reactors_Test.cpp: + * tests/Reader_Writer_Test.cpp: + * tests/Upgradable_RW_Test.cpp: Added #include of Atomic_Op.h in + all the above files. + Mon Dec 24 20:12:05 2001 Balachandran Natarajan <bala@cs.wustl.edu> * ace/Synch_T.h: diff --git a/ChangeLogs/ChangeLog-02a b/ChangeLogs/ChangeLog-02a index 421f08126e1..cc6cbcc1566 100644 --- a/ChangeLogs/ChangeLog-02a +++ b/ChangeLogs/ChangeLog-02a @@ -1,3 +1,35 @@ +Mon Dec 24 23:52:43 2001 Balachandran Natarajan <bala@cs.wustl.edu> + + * ace/Synch_T.cpp: + * ace/Synch_T.h: Removed ACE_Atomic_Op to a new file. + + * ace/Atomic_Op.h: + * ace/Atomic_Op.i: + * ace/Atomic_Op.cpp: The class ACE_Atomic_Op is in this file now. + + * ace/Functor.h: + * ace/Functor.i: Added template specializations for some base + types like ACE_UINT16. Thanks to Joe Hoffert for giving the + patches. + + * ace/RMCast/RMCast_Reassembly.cpp: Removed a template + instantation for ACE_Equal_To. + + * tests/Atomic_Op_Test.cpp: + * tests/Auto_IncDec_Test.cpp: + * tests/Cache_Map_Manager_Test.cpp: + * tests/Future_Set_Test.cpp: + * tests/Future_Test.cpp: + * tests/Hash_Map_Bucket_Iterator_Test.cpp: + * tests/MEM_Stream_Test.cpp: + * tests/Map_Manager_Test.cpp: + * tests/Message_Queue_Notifications_Test.cpp: + * tests/Notify_Performance_Test.cpp: + * tests/Reactors_Test.cpp: + * tests/Reader_Writer_Test.cpp: + * tests/Upgradable_RW_Test.cpp: Added #include of Atomic_Op.h in + all the above files. + Mon Dec 24 20:12:05 2001 Balachandran Natarajan <bala@cs.wustl.edu> * ace/Synch_T.h: diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a index 421f08126e1..cc6cbcc1566 100644 --- a/ChangeLogs/ChangeLog-03a +++ b/ChangeLogs/ChangeLog-03a @@ -1,3 +1,35 @@ +Mon Dec 24 23:52:43 2001 Balachandran Natarajan <bala@cs.wustl.edu> + + * ace/Synch_T.cpp: + * ace/Synch_T.h: Removed ACE_Atomic_Op to a new file. + + * ace/Atomic_Op.h: + * ace/Atomic_Op.i: + * ace/Atomic_Op.cpp: The class ACE_Atomic_Op is in this file now. + + * ace/Functor.h: + * ace/Functor.i: Added template specializations for some base + types like ACE_UINT16. Thanks to Joe Hoffert for giving the + patches. + + * ace/RMCast/RMCast_Reassembly.cpp: Removed a template + instantation for ACE_Equal_To. + + * tests/Atomic_Op_Test.cpp: + * tests/Auto_IncDec_Test.cpp: + * tests/Cache_Map_Manager_Test.cpp: + * tests/Future_Set_Test.cpp: + * tests/Future_Test.cpp: + * tests/Hash_Map_Bucket_Iterator_Test.cpp: + * tests/MEM_Stream_Test.cpp: + * tests/Map_Manager_Test.cpp: + * tests/Message_Queue_Notifications_Test.cpp: + * tests/Notify_Performance_Test.cpp: + * tests/Reactors_Test.cpp: + * tests/Reader_Writer_Test.cpp: + * tests/Upgradable_RW_Test.cpp: Added #include of Atomic_Op.h in + all the above files. + Mon Dec 24 20:12:05 2001 Balachandran Natarajan <bala@cs.wustl.edu> * ace/Synch_T.h: diff --git a/ace/Atomic_Op.cpp b/ace/Atomic_Op.cpp new file mode 100644 index 00000000000..df82902efcb --- /dev/null +++ b/ace/Atomic_Op.cpp @@ -0,0 +1,83 @@ +#ifndef ACE_ATOMIC_OP_C +#define ACE_ATOMIC_OP_C + +#include "ace/Atomic_Op.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#if !defined (__ACE_INLINE__) +// On non-Win32 platforms, this code will be treated as normal code. +#if !defined (ACE_WIN32) +#include "ace/Atomic_Op.i" +#endif /* !ACE_WIN32 */ +#endif /* __ACE_INLINE__ */ + + +ACE_ALLOC_HOOK_DEFINE(ACE_Atomic_Op_Ex) +ACE_ALLOC_HOOK_DEFINE(ACE_Atomic_Op) + +ACE_RCSID(ace, Atomic_Op, "$Id$") + +// ************************************************* +template <class ACE_LOCK, class TYPE> ACE_LOCK & +ACE_Atomic_Op_Ex<ACE_LOCK, TYPE>::mutex (void) +{ + // ACE_TRACE ("ACE_Atomic_Op_Ex<ACE_LOCK, TYPE>::mutex"); + return this->mutex_; +} + +template <class ACE_LOCK, class TYPE> void +ACE_Atomic_Op_Ex<ACE_LOCK, TYPE>::dump (void) const +{ + // ACE_TRACE ("ACE_Atomic_Op_Ex<ACE_LOCK, TYPE>::dump"); + ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); + this->mutex_.dump (); + ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP)); +} + +template <class ACE_LOCK, class TYPE> +ACE_Atomic_Op_Ex<ACE_LOCK, TYPE>::ACE_Atomic_Op_Ex + (ACE_LOCK &mtx) + : mutex_ (mtx), + value_ (0) +{ + // ACE_TRACE ("ACE_Atomic_Op_Ex<ACE_LOCK, TYPE>::ACE_Atomic_Op_Ex"); +} + +template <class ACE_LOCK, class TYPE> +ACE_Atomic_Op_Ex<ACE_LOCK, TYPE>::ACE_Atomic_Op_Ex + (ACE_LOCK &mtx, const TYPE &c) + : mutex_ (mtx), + value_ (c) +{ +// ACE_TRACE ("ACE_Atomic_Op_Ex<ACE_LOCK, TYPE>::ACE_Atomic_Op_Ex"); +} + +// **************************************************************** + +template <class ACE_LOCK, class TYPE> +ACE_Atomic_Op<ACE_LOCK, TYPE>::ACE_Atomic_Op (void) + : ACE_Atomic_Op_Ex < ACE_LOCK,TYPE > (this->own_mutex_) +{ + // ACE_TRACE ("ACE_Atomic_Op<ACE_LOCK, TYPE>::ACE_Atomic_Op"); +} + +template <class ACE_LOCK, class TYPE> +ACE_Atomic_Op<ACE_LOCK, TYPE>::ACE_Atomic_Op (const TYPE &c) + : ACE_Atomic_Op_Ex < ACE_LOCK,TYPE > (this->own_mutex_, c) +{ + // ACE_TRACE ("ACE_Atomic_Op<ACE_LOCK, TYPE>::ACE_Atomic_Op"); +} + +template <class ACE_LOCK, class TYPE> ACE_INLINE +ACE_Atomic_Op<ACE_LOCK, TYPE>::ACE_Atomic_Op + (const ACE_Atomic_Op<ACE_LOCK, TYPE> &rhs) + : ACE_Atomic_Op_Ex < ACE_LOCK,TYPE > + ( this->own_mutex_, rhs.value() ) +{ +// ACE_TRACE ("ACE_Atomic_Op<ACE_LOCK, TYPE>::ACE_Atomic_Op"); +} + +#endif /*ACE_ATOMIC_OP */ diff --git a/ace/Atomic_Op.h b/ace/Atomic_Op.h new file mode 100644 index 00000000000..878b1aaad0e --- /dev/null +++ b/ace/Atomic_Op.h @@ -0,0 +1,189 @@ +/* -*- C++ -*- */ + +//============================================================================= +/** + * @file Atomic_Op.h + * + * $Id$ + * + * @author Douglas C. Schmidt <schmidt@uci.edu> + */ +//============================================================================= + +#ifndef ACE_ATOMIC_OP_H +#define ACE_ATOMIC_OP_H +#include "ace/pre.h" + +#include "ace/config-all.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + + +/** + * @class ACE_Atomic_Op_Ex + * + * @brief Transparently parameterizes synchronization into basic + * arithmetic operations. + * + * This class is described in an article in the July/August 1994 + * issue of the C++ Report magazine. It implements a + * templatized version of the Decorator pattern from the GoF book. + */ +template <class ACE_LOCK, class TYPE> +class ACE_Atomic_Op_Ex +{ +public: + // = Initialization methods. + + /// Initialize <value_> to 0. + ACE_Atomic_Op_Ex (ACE_LOCK &mtx); + + /// Initialize <value_> to c. + ACE_Atomic_Op_Ex (ACE_LOCK &mtx, const TYPE &c); + + // = Accessors. + + /// Atomically pre-increment <value_>. + TYPE operator++ (void); + + /// Atomically post-increment <value_>. + TYPE operator++ (int); + + /// Atomically increment <value_> by i. + TYPE operator+= (const TYPE &i); + + /// Atomically pre-decrement <value_>. + TYPE operator-- (void); + + /// Atomically post-decrement <value_>. + TYPE operator-- (int); + + /// Atomically decrement <value_> by i. + TYPE operator-= (const TYPE &i); + + /// Atomically compare <value_> with i. + int operator== (const TYPE &i) const; + + /// Atomically compare <value_> with i. + int operator!= (const TYPE &i) const; + + /// Atomically check if <value_> greater than or equal to i. + int operator>= (const TYPE &i) const; + + /// Atomically check if <value_> greater than i. + int operator> (const TYPE &rhs) const; + + /// Atomically check if <value_> less than or equal to i. + int operator<= (const TYPE &rhs) const; + + /// Atomically check if <value_> less than i. + int operator< (const TYPE &rhs) const; + + /// Atomically assign i to <value_>. + void operator= (const TYPE &i); + + /// Atomically assign <rhs> to <value_>. + void operator= (const ACE_Atomic_Op_Ex<ACE_LOCK, TYPE> &rhs); + + /// Explicitly return <value_>. + TYPE value (void) const; + + /// Dump the state of an object. + void dump (void) const; + + // ACE_ALLOC_HOOK_DECLARE; + // Declare the dynamic allocation hooks. + + /// Manage copying... + ACE_Atomic_Op_Ex (const ACE_Atomic_Op_Ex<ACE_LOCK, TYPE> &); + + /** + * Returns a reference to the underlying <ACE_LOCK>. This makes it + * possible to acquire the lock explicitly, which can be useful in + * some cases if you instantiate the <ACE_Atomic_Op> with an + * <ACE_Recursive_Mutex> or <ACE_Process_Mutex>. NOTE: the right + * name would be lock_, but HP/C++ will choke on that! + */ + ACE_LOCK &mutex (void); + + /** + * Explicitly return <value_> (by reference). This gives the user + * full, unrestricted access to the underlying value. This method + * will usually be used in conjunction with explicit access to the + * lock. Use with care ;-) + */ + TYPE &value_i (void); + +private: + /// Type of synchronization mechanism. + ACE_LOCK &mutex_; + + /// Current object decorated by the atomic op. + TYPE value_; +}; + +template <class ACE_LOCK, class TYPE> +class ACE_Atomic_Op : public ACE_Atomic_Op_Ex <ACE_LOCK, TYPE> +{ +public: + /// Initialize <value_> to 0. + ACE_Atomic_Op (void); + + /// Initialize <value_> to c. + ACE_Atomic_Op (const TYPE &c); + + /// Manage copying... + ACE_Atomic_Op (const ACE_Atomic_Op<ACE_LOCK, TYPE> &); + + /// Atomically assign i to <value_>. + void operator= (const TYPE &i); + + /// Atomically assign <rhs> to <value_>. + void operator= (const ACE_Atomic_Op_Ex<ACE_LOCK, TYPE> &rhs); + +private: + /// Type of synchronization mechanism. + ACE_LOCK own_mutex_; +}; + + +#if defined (__ACE_INLINE__) +// On non-Win32 platforms, this code will be inlined +#if !defined (ACE_WIN32) +#include "ace/Atomic_Op.i" +#endif /* !ACE_WIN32 */ +#endif /* __ACE_INLINE__ */ + +#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) + +#include "Atomic_Op.cpp" +// On Win32 platforms, this code will be included as template source +// code and will not be inlined. Therefore, we first turn off +// ACE_INLINE, set it to be nothing, include the code, and then turn +// ACE_INLINE back to its original setting. All this nonsense is +// necessary, since the generic template code that needs to be +// specialized cannot be inlined, else the compiler will ignore the +// specialization code. Also, the specialization code *must* be +// inlined or the compiler will ignore the specializations. +#if defined (ACE_WIN32) +#undef ACE_INLINE +#define ACE_INLINE +#include "ace/Atomic_Op.i" +#undef ACE_INLINE +#if defined (__ACE_INLINE__) +#define ACE_INLINE inline +#else +#define ACE_INLINE +#endif /* __ACE_INLINE__ */ +#endif /* ACE_WIN32 */ +#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ + + +#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) +#pragma implementation ("Atomic_Op.cpp") +#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ + +#include "ace/post.h" +#endif /*ACE_ATOMIC_OP_H*/ diff --git a/ace/Atomic_Op.i b/ace/Atomic_Op.i index ab2e38678b2..33ee42fa79f 100644 --- a/ace/Atomic_Op.i +++ b/ace/Atomic_Op.i @@ -1,7 +1,7 @@ // -*- C++ -*- // $Id$ -template <class ACE_LOCK, class TYPE> ACE_INLINE TYPE +template <class ACE_LOCK, class TYPE> ACE_INLINE TYPE ACE_Atomic_Op_Ex<ACE_LOCK, TYPE>::operator++ (void) { // ACE_TRACE ("ACE_Atomic_Op_Ex<ACE_LOCK, TYPE>::operator++"); @@ -41,7 +41,7 @@ ACE_Atomic_Op_Ex<ACE_LOCK, TYPE>::ACE_Atomic_Op_Ex (const ACE_Atomic_Op_Ex<ACE_L *this = rhs; // Invoke the assignment operator. } -template <class ACE_LOCK, class TYPE> ACE_INLINE TYPE +template <class ACE_LOCK, class TYPE> ACE_INLINE TYPE ACE_Atomic_Op_Ex<ACE_LOCK, TYPE>::operator++ (int) { // ACE_TRACE ("ACE_Atomic_Op_Ex<ACE_LOCK, TYPE>::operator++"); @@ -122,7 +122,7 @@ ACE_Atomic_Op_Ex<ACE_LOCK, TYPE>::value (void) const { // ACE_TRACE ("ACE_Atomic_Op_Ex<ACE_LOCK, TYPE>::value"); ACE_GUARD_RETURN (ACE_LOCK, ace_mon, (ACE_LOCK &) this->mutex_, this->value_); - return this->value_; + return this->value_; } template <class ACE_LOCK, class TYPE> ACE_INLINE TYPE & @@ -132,7 +132,7 @@ ACE_Atomic_Op_Ex<ACE_LOCK, TYPE>::value_i (void) // full, unrestricted access to the underlying value. This method // will usually be used in conjunction with explicit access to the // lock. Use with care ;-) - return this->value_; + return this->value_; } template <class ACE_LOCK, class TYPE> ACE_INLINE void diff --git a/ace/Functor.h b/ace/Functor.h index 7eb6333016e..5e96d5cbad5 100644 --- a/ace/Functor.h +++ b/ace/Functor.h @@ -23,7 +23,7 @@ * @author Douglas C. Schmidt <schmidt@cs.wustl.edu> * @author Sergio Flores-Gaitan <sergio@cs.wustl.edu> * @author and on STL-style functor implementations originally done by - * @author Irfan Pyarali <irfan@cs.wustl.edu> + * @author Irfan Pyarali <irfan@cs.wustl.edu> */ //============================================================================= @@ -246,6 +246,82 @@ public: const ACE_TCHAR *rhs) const; }; + ACE_TEMPLATE_SPECIALIZATION + /** + * @class ACE_Equal_To<ACE_UINT16> + * + * @brief Function object for determining whether two unsigned + * 16 bit ints are equal. + */ +class ACE_Export ACE_Equal_To<ACE_UINT16> +{ +public: + /// Simply calls built-in operators + int operator () (const ACE_UINT16 lhs, + const ACE_UINT16 rhs) const; +}; + +ACE_TEMPLATE_SPECIALIZATION +/** + * @class ACE_Equal_To<ACE_INT16> + * + * @brief Function object for determining whether two + * 16 bit ints are equal. + */ +class ACE_Export ACE_Equal_To<ACE_INT16> +{ +public: + /// Simply calls built-in operators + int operator () (const ACE_INT16 lhs, + const ACE_INT16 rhs) const; +}; + +ACE_TEMPLATE_SPECIALIZATION +/** + * @class ACE_Equal_To<ACE_UINT32> + * + * @brief Function object for determining whether two unsigned + * 32 bit ints are equal. + */ +class ACE_Export ACE_Equal_To<ACE_UINT32> +{ +public: + /// Simply calls built-in operators + int operator () (const ACE_UINT32 lhs, + const ACE_UINT32 rhs) const; +}; + +ACE_TEMPLATE_SPECIALIZATION +/** + * @class ACE_Equal_To<ACE_INT32> + * + * @brief Function object for determining whether two + * 32 bit ints are equal. + */ +class ACE_Export ACE_Equal_To<ACE_INT32> +{ +public: + /// Simply calls built-in operators + int operator () (const ACE_INT32 lhs, + const ACE_INT32 rhs) const; +}; + +ACE_TEMPLATE_SPECIALIZATION +/** + * @class ACE_Equal_To<ACE_UINT64> + * + * @brief Function object for determining whether two unsigned + * 64 bit ints are equal. + */ +class ACE_Export ACE_Equal_To<ACE_UINT64> +{ +public: + /// Simply calls built-in operators + int operator () (const ACE_UINT64 lhs, + const ACE_UINT64 rhs) const; +}; + + ACE_TEMPLATE_SPECIALIZATION /** * @class ACE_Less_Than<const diff --git a/ace/Functor.i b/ace/Functor.i index 3fe587c8b95..5e46485304d 100644 --- a/ace/Functor.i +++ b/ace/Functor.i @@ -52,7 +52,7 @@ ACE_Command_Base::~ACE_Command_Base (void) //////////////////////////////////////////////////////////// ACE_TEMPLATE_METHOD_SPECIALIZATION -ACE_INLINE +ACE_INLINE u_long ACE_Hash<char>::operator () (char t) const { @@ -123,6 +123,7 @@ ACE_Hash<ACE_TCHAR *>::operator () (const ACE_TCHAR *t) const return ACE::hash_pjw (t); } +/***********************************************************************/ ACE_TEMPLATE_METHOD_SPECIALIZATION ACE_INLINE int ACE_Equal_To<const ACE_TCHAR *>::operator () (const ACE_TCHAR *lhs, const ACE_TCHAR *rhs) const @@ -137,6 +138,41 @@ ACE_Equal_To<ACE_TCHAR *>::operator () (const ACE_TCHAR *lhs, const ACE_TCHAR *r return !ACE_OS::strcmp (lhs, rhs); } +ACE_INLINE int +ACE_Equal_To<ACE_UINT16>::operator () (const ACE_UINT16 lhs, const ACE_UINT16 rhs) const +{ + return (lhs == rhs); +} + +ACE_TEMPLATE_METHOD_SPECIALIZATION +ACE_INLINE int +ACE_Equal_To<ACE_INT16>::operator () (const ACE_INT16 lhs, const ACE_INT16 rhs) const +{ + return (lhs == rhs); +} + +ACE_TEMPLATE_METHOD_SPECIALIZATION +ACE_INLINE int +ACE_Equal_To<ACE_UINT32>::operator () (const ACE_UINT32 lhs, const ACE_UINT32 rhs) const +{ + return (lhs == rhs); +} + +ACE_TEMPLATE_METHOD_SPECIALIZATION +ACE_INLINE int +ACE_Equal_To<ACE_INT32>::operator () (const ACE_INT32 lhs, const ACE_INT32 rhs) const +{ + return (lhs == rhs); +} + +ACE_TEMPLATE_METHOD_SPECIALIZATION +ACE_INLINE int +ACE_Equal_To<ACE_UINT64>::operator () (const ACE_UINT64 lhs, const ACE_UINT64 rhs) const +{ + return (lhs == rhs); +} + +/****************************************************************************/ ACE_TEMPLATE_METHOD_SPECIALIZATION ACE_INLINE int ACE_Less_Than<const ACE_TCHAR *>::operator () (const ACE_TCHAR *lhs, const ACE_TCHAR *rhs) const diff --git a/ace/RMCast/RMCast_Reassembly.cpp b/ace/RMCast/RMCast_Reassembly.cpp index 85db12f1cf3..d20b72d88c5 100644 --- a/ace/RMCast/RMCast_Reassembly.cpp +++ b/ace/RMCast/RMCast_Reassembly.cpp @@ -135,7 +135,6 @@ template class ACE_Hash_Map_Reverse_Iterator_Ex<ACE_UINT32,ACE_RMCast_Partial_Me template class ACE_Hash_Map_Iterator_Base_Ex<ACE_UINT32,ACE_RMCast_Partial_Message*,ACE_Hash<ACE_UINT32>,ACE_Equal_To<ACE_UINT32>,ACE_Null_Mutex >; template class ACE_Hash_Map_Entry<ACE_UINT32,ACE_RMCast_Partial_Message*>; -template class ACE_Equal_To<ACE_UINT32>; template class ACE_Less_Than<ACE_UINT32>; #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/ace/Synch_T.cpp b/ace/Synch_T.cpp index b9c036183e3..2ec9d59acce 100644 --- a/ace/Synch_T.cpp +++ b/ace/Synch_T.cpp @@ -1,5 +1,6 @@ // $Id$ + #ifndef ACE_SYNCH_T_C #define ACE_SYNCH_T_C @@ -16,14 +17,9 @@ ACE_RCSID(ace, Synch_T, "$Id$") #if !defined (__ACE_INLINE__) #include "ace/Synch_T.i" -// On non-Win32 platforms, this code will be treated as normal code. -#if !defined (ACE_WIN32) -#include "ace/Atomic_Op.i" -#endif /* !ACE_WIN32 */ #endif /* __ACE_INLINE__ */ -ACE_ALLOC_HOOK_DEFINE(ACE_Atomic_Op_Ex) -ACE_ALLOC_HOOK_DEFINE(ACE_Atomic_Op) + // This constructor isn't inlined, because SunPRO C++ 4.2 + patch // 104631-07 has trouble compiling TAO with it inline. @@ -40,68 +36,6 @@ template <class ACE_LOCKING_MECHANISM> ACE_Reverse_Lock<ACE_LOCKING_MECHANISM>::~ACE_Reverse_Lock (void) { } - -// ************************************************* - -template <class ACE_LOCK, class TYPE> ACE_LOCK & -ACE_Atomic_Op_Ex<ACE_LOCK, TYPE>::mutex (void) -{ - // ACE_TRACE ("ACE_Atomic_Op_Ex<ACE_LOCK, TYPE>::mutex"); - return this->mutex_; -} - -template <class ACE_LOCK, class TYPE> void -ACE_Atomic_Op_Ex<ACE_LOCK, TYPE>::dump (void) const -{ - // ACE_TRACE ("ACE_Atomic_Op_Ex<ACE_LOCK, TYPE>::dump"); - ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - this->mutex_.dump (); - ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -} - -template <class ACE_LOCK, class TYPE> -ACE_Atomic_Op_Ex<ACE_LOCK, TYPE>::ACE_Atomic_Op_Ex - (ACE_LOCK &mtx) - : mutex_ (mtx), - value_ (0) -{ - // ACE_TRACE ("ACE_Atomic_Op_Ex<ACE_LOCK, TYPE>::ACE_Atomic_Op_Ex"); -} - -template <class ACE_LOCK, class TYPE> -ACE_Atomic_Op_Ex<ACE_LOCK, TYPE>::ACE_Atomic_Op_Ex - (ACE_LOCK &mtx, const TYPE &c) - : mutex_ (mtx), - value_ (c) -{ -// ACE_TRACE ("ACE_Atomic_Op_Ex<ACE_LOCK, TYPE>::ACE_Atomic_Op_Ex"); -} - -// **************************************************************** - -template <class ACE_LOCK, class TYPE> -ACE_Atomic_Op<ACE_LOCK, TYPE>::ACE_Atomic_Op (void) - : ACE_Atomic_Op_Ex < ACE_LOCK,TYPE > (this->own_mutex_) -{ - // ACE_TRACE ("ACE_Atomic_Op<ACE_LOCK, TYPE>::ACE_Atomic_Op"); -} - -template <class ACE_LOCK, class TYPE> -ACE_Atomic_Op<ACE_LOCK, TYPE>::ACE_Atomic_Op (const TYPE &c) - : ACE_Atomic_Op_Ex < ACE_LOCK,TYPE > (this->own_mutex_, c) -{ - // ACE_TRACE ("ACE_Atomic_Op<ACE_LOCK, TYPE>::ACE_Atomic_Op"); -} - -template <class ACE_LOCK, class TYPE> -ACE_Atomic_Op<ACE_LOCK, TYPE>::ACE_Atomic_Op - (const ACE_Atomic_Op<ACE_LOCK, TYPE> &rhs) - : ACE_Atomic_Op_Ex <ACE_LOCK,TYPE > - ( this->own_mutex_, rhs.value() ) -{ -// ACE_TRACE ("ACE_Atomic_Op<ACE_LOCK, TYPE>::ACE_Atomic_Op"); -} - // **************************************************************** // ACE_ALLOC_HOOK_DEFINE(ACE_Guard) diff --git a/ace/Synch_T.h b/ace/Synch_T.h index 639d09b2b88..74b3170f0ac 100644 --- a/ace/Synch_T.h +++ b/ace/Synch_T.h @@ -202,133 +202,6 @@ private: }; /** - * @class ACE_Atomic_Op_Ex - * - * @brief Transparently parameterizes synchronization into basic - * arithmetic operations. - * - * This class is described in an article in the July/August 1994 - * issue of the C++ Report magazine. It implements a - * templatized version of the Decorator pattern from the GoF book. - */ -template <class ACE_LOCK, class TYPE> -class ACE_Atomic_Op_Ex -{ -public: - // = Initialization methods. - - /// Initialize <value_> to 0. - ACE_Atomic_Op_Ex (ACE_LOCK &mtx); - - /// Initialize <value_> to c. - ACE_Atomic_Op_Ex (ACE_LOCK &mtx, const TYPE &c); - - // = Accessors. - - /// Atomically pre-increment <value_>. - TYPE operator++ (void); - - /// Atomically post-increment <value_>. - TYPE operator++ (int); - - /// Atomically increment <value_> by i. - TYPE operator+= (const TYPE &i); - - /// Atomically pre-decrement <value_>. - TYPE operator-- (void); - - /// Atomically post-decrement <value_>. - TYPE operator-- (int); - - /// Atomically decrement <value_> by i. - TYPE operator-= (const TYPE &i); - - /// Atomically compare <value_> with i. - int operator== (const TYPE &i) const; - - /// Atomically compare <value_> with i. - int operator!= (const TYPE &i) const; - - /// Atomically check if <value_> greater than or equal to i. - int operator>= (const TYPE &i) const; - - /// Atomically check if <value_> greater than i. - int operator> (const TYPE &rhs) const; - - /// Atomically check if <value_> less than or equal to i. - int operator<= (const TYPE &rhs) const; - - /// Atomically check if <value_> less than i. - int operator< (const TYPE &rhs) const; - - /// Atomically assign i to <value_>. - void operator= (const TYPE &i); - - /// Atomically assign <rhs> to <value_>. - void operator= (const ACE_Atomic_Op_Ex<ACE_LOCK, TYPE> &rhs); - - /// Explicitly return <value_>. - TYPE value (void) const; - - /// Dump the state of an object. - void dump (void) const; - - // ACE_ALLOC_HOOK_DECLARE; - // Declare the dynamic allocation hooks. - - /// Manage copying... - ACE_Atomic_Op_Ex (const ACE_Atomic_Op_Ex<ACE_LOCK, TYPE> &); - - /** - * Returns a reference to the underlying <ACE_LOCK>. This makes it - * possible to acquire the lock explicitly, which can be useful in - * some cases if you instantiate the <ACE_Atomic_Op> with an - * <ACE_Recursive_Mutex> or <ACE_Process_Mutex>. NOTE: the right - * name would be lock_, but HP/C++ will choke on that! - */ - ACE_LOCK &mutex (void); - - /** - * Explicitly return <value_> (by reference). This gives the user - * full, unrestricted access to the underlying value. This method - * will usually be used in conjunction with explicit access to the - * lock. Use with care ;-) - */ - TYPE &value_i (void); - -private: - /// Type of synchronization mechanism. - ACE_LOCK &mutex_; - - /// Current object decorated by the atomic op. - TYPE value_; -}; - -template <class ACE_LOCK, class TYPE> -class ACE_Atomic_Op : public ACE_Atomic_Op_Ex <ACE_LOCK, TYPE> -{ -public: - /// Initialize <value_> to 0. - ACE_Atomic_Op (void); - - /// Initialize <value_> to c. - ACE_Atomic_Op (const TYPE &c); - - /// Manage copying... - ACE_Atomic_Op (const ACE_Atomic_Op<ACE_LOCK, TYPE> &); - - /// Atomically assign i to <value_>. - void operator= (const TYPE &i); - - /// Atomically assign <rhs> to <value_>. - void operator= (const ACE_Atomic_Op_Ex<ACE_LOCK, TYPE> &rhs); - -private: - /// Type of synchronization mechanism. - ACE_LOCK own_mutex_; -}; - -/** * @class ACE_TSS * * @brief Allows objects that are "physically" in thread specific @@ -1016,33 +889,10 @@ public: #if defined (__ACE_INLINE__) #include "ace/Synch_T.i" -// On non-Win32 platforms, this code will be inlined -#if !defined (ACE_WIN32) -#include "ace/Atomic_Op.i" -#endif /* !ACE_WIN32 */ #endif /* __ACE_INLINE__ */ #if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Synch_T.cpp" -// On Win32 platforms, this code will be included as template source -// code and will not be inlined. Therefore, we first turn off -// ACE_INLINE, set it to be nothing, include the code, and then turn -// ACE_INLINE back to its original setting. All this nonsense is -// necessary, since the generic template code that needs to be -// specialized cannot be inlined, else the compiler will ignore the -// specialization code. Also, the specialization code *must* be -// inlined or the compiler will ignore the specializations. -#if defined (ACE_WIN32) -#undef ACE_INLINE -#define ACE_INLINE -#include "ace/Atomic_Op.i" -#undef ACE_INLINE -#if defined (__ACE_INLINE__) -#define ACE_INLINE inline -#else -#define ACE_INLINE -#endif /* __ACE_INLINE__ */ -#endif /* ACE_WIN32 */ #endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ #if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) diff --git a/protocols/ace/RMCast/RMCast_Reassembly.cpp b/protocols/ace/RMCast/RMCast_Reassembly.cpp index 85db12f1cf3..d20b72d88c5 100644 --- a/protocols/ace/RMCast/RMCast_Reassembly.cpp +++ b/protocols/ace/RMCast/RMCast_Reassembly.cpp @@ -135,7 +135,6 @@ template class ACE_Hash_Map_Reverse_Iterator_Ex<ACE_UINT32,ACE_RMCast_Partial_Me template class ACE_Hash_Map_Iterator_Base_Ex<ACE_UINT32,ACE_RMCast_Partial_Message*,ACE_Hash<ACE_UINT32>,ACE_Equal_To<ACE_UINT32>,ACE_Null_Mutex >; template class ACE_Hash_Map_Entry<ACE_UINT32,ACE_RMCast_Partial_Message*>; -template class ACE_Equal_To<ACE_UINT32>; template class ACE_Less_Than<ACE_UINT32>; #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/tests/Atomic_Op_Test.cpp b/tests/Atomic_Op_Test.cpp index ba8a3ad63c8..1a63f9d561a 100644 --- a/tests/Atomic_Op_Test.cpp +++ b/tests/Atomic_Op_Test.cpp @@ -20,7 +20,7 @@ // ============================================================================ #include "tests/test_config.h" -#include "ace/Synch.h" +#include "ace/Atomic_Op.h" ACE_RCSID(tests, Atomic_Op_Test, "$Id$") diff --git a/tests/Auto_IncDec_Test.cpp b/tests/Auto_IncDec_Test.cpp index 5c52410ade5..07c97e9d10f 100644 --- a/tests/Auto_IncDec_Test.cpp +++ b/tests/Auto_IncDec_Test.cpp @@ -19,8 +19,10 @@ #include "ace/Auto_IncDec_T.h" #include "ace/Thread_Manager.h" +#include "ace/Atomic_Op.h" #include "tests/test_config.h" + ACE_RCSID(tests, Auto_IncDec_Test, "Auto_IncDec_Test.cpp, by Edan Ayal") #if defined (ACE_HAS_THREADS) @@ -28,7 +30,7 @@ ACE_RCSID(tests, Auto_IncDec_Test, "Auto_IncDec_Test.cpp, by Edan Ayal") // Default number of threads. static size_t n_threads = 15; -typedef ACE_Atomic_Op<ACE_Thread_Mutex, int> INTERLOCKED_INT; +typedef ACE_Atomic_Op<ACE_Thread_Mutex, int> INTERLOCKED_INT; static INTERLOCKED_INT current_threads_in_first_section; static INTERLOCKED_INT current_threads_in_second_section; @@ -96,7 +98,7 @@ main (int, ACE_TCHAR *[]) current_threads_in_first_section = 0; current_threads_in_second_section = 0; - if (ACE_Thread_Manager::instance ()->spawn_n + if (ACE_Thread_Manager::instance ()->spawn_n (n_threads, ACE_THR_FUNC (worker), 0, diff --git a/tests/Cache_Map_Manager_Test.cpp b/tests/Cache_Map_Manager_Test.cpp index 26c708291e5..fd703743c69 100644 --- a/tests/Cache_Map_Manager_Test.cpp +++ b/tests/Cache_Map_Manager_Test.cpp @@ -602,7 +602,6 @@ main (int argc, ACE_TCHAR *argv[]) template class ACE_Pair<VALUE, ATTR>; template class ACE_Reference_Pair<KEY, VALUE>; -template class ACE_Equal_To<KEY>; template class ACE_Hash_Map_Manager_Ex<KEY, CACHE_VALUE, Hash_Key, ACE_Equal_To<KEY>, ACE_Null_Mutex>; template class ACE_Hash_Map_Iterator_Ex<KEY, CACHE_VALUE, Hash_Key, ACE_Equal_To<KEY>, ACE_Null_Mutex>; @@ -655,7 +654,6 @@ template class ACE_Hash_Cache_Map_Manager<KEY, VALUE, Hash_Key, ACE_Equal_To<KEY #pragma instantiate ACE_Pair<VALUE, ATTR> #pragma instantiate ACE_Reference_Pair<KEY, VALUE> -#pragma instantiate ACE_Equal_To<KEY> #pragma instantiate ACE_Hash_Map_Manager_Ex<KEY, CACHE_VALUE, Hash_Key, ACE_Equal_To<KEY>, ACE_Null_Mutex> #pragma instantiate ACE_Hash_Map_Iterator_Ex<KEY, CACHE_VALUE, Hash_Key, ACE_Equal_To<KEY>, ACE_Null_Mutex> diff --git a/tests/Future_Set_Test.cpp b/tests/Future_Set_Test.cpp index 9dde2480069..15c196540e5 100644 --- a/tests/Future_Set_Test.cpp +++ b/tests/Future_Set_Test.cpp @@ -18,7 +18,7 @@ // = AUTHOR // Andres Kruse <Andres.Kruse@cern.ch>, // Douglas C. Schmidt <schmidt@cs.wustl.edu>, -// Per Andersson <pera@ipso.se> and +// Per Andersson <pera@ipso.se> and // Johnny Tucker <jtucker@infoglide.com> // // ============================================================================ @@ -33,6 +33,7 @@ #include "ace/Method_Request.h" #include "ace/Activation_Queue.h" #include "ace/Auto_Ptr.h" +#include "ace/Atomic_Op.h" ACE_RCSID(tests, Future_Set_Test, "$Id$") diff --git a/tests/Future_Test.cpp b/tests/Future_Test.cpp index e1bd518ccdc..8c53783d09d 100644 --- a/tests/Future_Test.cpp +++ b/tests/Future_Test.cpp @@ -31,6 +31,8 @@ #include "ace/Method_Request.h" #include "ace/Activation_Queue.h" #include "ace/Auto_Ptr.h" +#include "ace/Atomic_Op.h" + ACE_RCSID(tests, Future_Test, "$Id$") diff --git a/tests/Hash_Map_Bucket_Iterator_Test.cpp b/tests/Hash_Map_Bucket_Iterator_Test.cpp index 2f2e13b96e1..d128a441ec1 100644 --- a/tests/Hash_Map_Bucket_Iterator_Test.cpp +++ b/tests/Hash_Map_Bucket_Iterator_Test.cpp @@ -117,7 +117,6 @@ main (int argc, ACE_TCHAR *argv[]) #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) -template class ACE_Equal_To<ACE_UINT32>; template class ACE_Hash_Map_Entry<ACE_UINT32, ACE_UINT32>; template class ACE_Hash_Map_Manager_Ex<ACE_UINT32, ACE_UINT32, ACE_Hash<ACE_UINT32>, ACE_Equal_To<ACE_UINT32>, ACE_SYNCH_NULL_MUTEX>; template class ACE_Hash_Map_Iterator_Base_Ex<ACE_UINT32, ACE_UINT32, ACE_Hash<ACE_UINT32>, ACE_Equal_To<ACE_UINT32>, ACE_SYNCH_NULL_MUTEX>; @@ -127,7 +126,6 @@ template class ACE_Hash_Map_Bucket_Iterator<ACE_UINT32, ACE_UINT32, ACE_Hash<ACE #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate ACE_Equal_To<ACE_UINT32> #pragma instantiate ACE_Hash_Map_Entry<ACE_UINT32, ACE_UINT32> #pragma instantiate ACE_Hash_Map_Manager_Ex<ACE_UINT32, ACE_UINT32, ACE_Hash<ACE_UINT32>, ACE_Equal_To<ACE_UINT32>, ACE_SYNCH_NULL_MUTEX> #pragma instantiate ACE_Hash_Map_Iterator_Base_Ex<ACE_UINT32, ACE_UINT32, ACE_Hash<ACE_UINT32>, ACE_Equal_To<ACE_UINT32>, ACE_SYNCH_NULL_MUTEX> diff --git a/tests/MEM_Stream_Test.cpp b/tests/MEM_Stream_Test.cpp index edf8b8844fd..6bd389cb209 100644 --- a/tests/MEM_Stream_Test.cpp +++ b/tests/MEM_Stream_Test.cpp @@ -28,6 +28,7 @@ #include "ace/Acceptor.h" #include "ace/Svc_Handler.h" #include "ace/Singleton.h" +#include "ace/Atomic_Op.h" ACE_RCSID(tests, MEM_Stream_Test, "$Id$") diff --git a/tests/Map_Manager_Test.cpp b/tests/Map_Manager_Test.cpp index 8eefa5fd471..d00218763c8 100644 --- a/tests/Map_Manager_Test.cpp +++ b/tests/Map_Manager_Test.cpp @@ -961,7 +961,6 @@ main (int argc, ACE_TCHAR *argv[]) defined (ACE_HAS_GNU_REPO) // The explicit instantiations are necessary with g++ 2.91.66 // with -frepo, because it misses some of them. -template class ACE_Equal_To<TYPE>; template class ACE_Pair<TYPE, ATTR>; template class ACE_Reference_Pair<TYPE, TYPE>; template class ACE_Hash_Map_Manager_Ex<TYPE, TYPE, HASH_KEY, COMPARE_KEYS, MUTEX>; @@ -994,7 +993,6 @@ template class ACE_Cache_Map_Manager<TYPE, TYPE, CACHE_MAP_IMPL, CACHE_ITER_IMPL template class ACE_Cache_Map_Iterator<TYPE, TYPE, CACHE_ITER_IMPL, NULL_CACHING_STRATEGY, ATTR>; template class ACE_Cache_Map_Reverse_Iterator<TYPE,TYPE, CACHE_REV_ITER_IMPL, NULL_CACHING_STRATEGY, ATTR>; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate ACE_Equal_To<TYPE> #pragma instantiate ACE_Pair<TYPE, ATTR> #pragma instantiate ACE_Reference_Pair<TYPE, TYPE> #pragma instantiate ACE_Hash_Map_Manager_Ex<TYPE, TYPE, HASH_KEY, COMPARE_KEYS, MUTEX> diff --git a/tests/Message_Queue_Notifications_Test.cpp b/tests/Message_Queue_Notifications_Test.cpp index c373e2ae3e3..08fe80a77ad 100644 --- a/tests/Message_Queue_Notifications_Test.cpp +++ b/tests/Message_Queue_Notifications_Test.cpp @@ -38,6 +38,7 @@ #include "ace/Reactor.h" #include "ace/Task.h" #include "ace/Reactor_Notification_Strategy.h" +#include "ace/Atomic_Op.h" ACE_RCSID(tests, Message_Queue_Notifications_Test, "$Id$") diff --git a/tests/Notify_Performance_Test.cpp b/tests/Notify_Performance_Test.cpp index df5270e6d33..bc71fe78955 100644 --- a/tests/Notify_Performance_Test.cpp +++ b/tests/Notify_Performance_Test.cpp @@ -28,6 +28,7 @@ #include "ace/Select_Reactor.h" #include "ace/Auto_Ptr.h" #include "ace/Synch.h" +#include "ace/Atomic_Op.h" ACE_RCSID(tests, Notify_Performance_Test, "$Id$") @@ -70,7 +71,8 @@ static void * client (void *arg) { // Number of client (user) threads - static ACE_Atomic_Op<ACE_Thread_Mutex, long> thread_counter = opt_nthreads; + static ACE_Atomic_Op<ACE_Thread_Mutex, long> thread_counter; + thread_counter = opt_nthreads; // To pass or not to pass is the question Handler *handler = 0; diff --git a/tests/Reactors_Test.cpp b/tests/Reactors_Test.cpp index cedaa209416..618912cb517 100644 --- a/tests/Reactors_Test.cpp +++ b/tests/Reactors_Test.cpp @@ -23,6 +23,7 @@ #include "ace/Synch.h" #include "ace/Task.h" #include "ace/Reactor.h" +#include "ace/Atomic_Op.h" ACE_RCSID(tests, Reactors_Test, "$Id$") @@ -63,6 +64,8 @@ int Test_Task::task_count_ = 0; static ACE_Atomic_Op<ACE_Thread_Mutex, int> done_count = MAX_TASKS * 2; + + static ACE_Recursive_Thread_Mutex recursive_lock; Test_Task::Test_Task (void) diff --git a/tests/Reader_Writer_Test.cpp b/tests/Reader_Writer_Test.cpp index 3b8a9ac15bf..41d68d88100 100644 --- a/tests/Reader_Writer_Test.cpp +++ b/tests/Reader_Writer_Test.cpp @@ -23,6 +23,7 @@ #include "ace/Thread.h" #include "ace/Thread_Manager.h" #include "ace/Get_Opt.h" +#include "ace/Atomic_Op.h" ACE_RCSID(tests, Reader_Writer_Test, "$Id$") diff --git a/tests/Upgradable_RW_Test.cpp b/tests/Upgradable_RW_Test.cpp index ca19827d112..7f9daae5c51 100644 --- a/tests/Upgradable_RW_Test.cpp +++ b/tests/Upgradable_RW_Test.cpp @@ -20,6 +20,7 @@ // ============================================================================ #include "Upgradable_RW_Test.h" +#include "ace/Atomic_Op.h" ACE_RCSID(tests, Upgradable_RW_Test, "$Id$") |