summaryrefslogtreecommitdiff
path: root/TAO/tao/Object.h
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2018-06-24 19:23:50 +0200
committerJohnny Willemsen <jwillemsen@remedy.nl>2018-06-24 19:23:50 +0200
commit36d7aee1a214c14b1621bf773e9aae82c9971af5 (patch)
tree2a049b28a7068451475a8f347e71e425bd641202 /TAO/tao/Object.h
parent9d5ca158661004ec2ecabc64f2ff8297c4c2e1b4 (diff)
downloadATCD-36d7aee1a214c14b1621bf773e9aae82c9971af5.tar.gz
Make use of std::atomic when C++11 has been enabled
* TAO/tao/AnyTypeCode/Any_Impl.cpp: * TAO/tao/AnyTypeCode/Any_Impl.h: * TAO/tao/AnyTypeCode/NVList.h: * TAO/tao/AnyTypeCode/True_RefCount_Policy.h: * TAO/tao/DynamicInterface/Context.cpp: * TAO/tao/DynamicInterface/Context.h: * TAO/tao/DynamicInterface/ExceptionList.cpp: * TAO/tao/DynamicInterface/ExceptionList.h: * TAO/tao/DynamicInterface/ExceptionList.inl: * TAO/tao/DynamicInterface/Request.h: * TAO/tao/DynamicInterface/Server_Request.h: * TAO/tao/Intrusive_Ref_Count_Base_T.h: * TAO/tao/Intrusive_Ref_Count_Base_T.inl: * TAO/tao/ORB.h: * TAO/tao/ORB.inl: * TAO/tao/ORB_Core.h: * TAO/tao/ORB_Core.inl: * TAO/tao/Object.cpp: * TAO/tao/Object.h: * TAO/tao/PortableServer/Servant_Base.cpp: * TAO/tao/PortableServer/Servant_Base.h: * TAO/tao/Principal.h: * TAO/tao/Profile.h: * TAO/tao/Refcounted_ObjectKey.cpp: * TAO/tao/Refcounted_ObjectKey.h: * TAO/tao/Refcounted_ObjectKey.inl: * TAO/tao/Reply_Dispatcher.cpp: * TAO/tao/Reply_Dispatcher.h: * TAO/tao/Stub.h: * TAO/tao/Valuetype/AbstractBase.h: * TAO/tao/Valuetype/ValueBase.cpp: * TAO/tao/Valuetype/ValueBase.h: * TAO/tao/Valuetype/ValueFactory.cpp: * TAO/tao/Valuetype/ValueFactory.h:
Diffstat (limited to 'TAO/tao/Object.h')
-rw-r--r--TAO/tao/Object.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/TAO/tao/Object.h b/TAO/tao/Object.h
index 8b401aab505..680428190b5 100644
--- a/TAO/tao/Object.h
+++ b/TAO/tao/Object.h
@@ -30,7 +30,11 @@
#include "tao/Object_Argument_T.h"
#include "tao/Arg_Traits_T.h"
#include "tao/Any_Insert_Policy_T.h"
-#include "ace/Atomic_Op.h"
+#if defined (ACE_HAS_CPP11)
+# include <atomic>
+#else
+# include "ace/Atomic_Op.h"
+#endif /* ACE_HAS_CPP11 */
#if defined (HPUX) && defined (IOR)
/* HP-UX 11.11 defines IOR in /usr/include/pa/inline.h
@@ -340,7 +344,11 @@ namespace CORBA
TAO::Object_Proxy_Broker *proxy_broker () const;
/// Number of outstanding references to this object.
+#if defined (ACE_HAS_CPP11)
+ std::atomic<uint32_t> refcount_;
+#else
ACE_Atomic_Op<TAO_SYNCH_MUTEX, unsigned long> refcount_;
+#endif /* ACE_HAS_CPP11 */
private: