summaryrefslogtreecommitdiff
path: root/TAO/tao/Valuetype/AbstractBase.h
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tao/Valuetype/AbstractBase.h')
-rw-r--r--TAO/tao/Valuetype/AbstractBase.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/TAO/tao/Valuetype/AbstractBase.h b/TAO/tao/Valuetype/AbstractBase.h
index da23142d059..d23b249e062 100644
--- a/TAO/tao/Valuetype/AbstractBase.h
+++ b/TAO/tao/Valuetype/AbstractBase.h
@@ -25,6 +25,11 @@
#include "tao/Objref_VarOut_T.h"
#include "tao/Object.h" /* For CORBA::Object_var */
#include "tao/Pseudo_VarOut_T.h"
+#if defined (ACE_HAS_CPP11)
+# include <atomic>
+#else
+# include "ace/Atomic_Op.h"
+#endif /* ACE_HAS_CPP11 */
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
@@ -143,7 +148,11 @@ namespace CORBA
private:
/// 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 */
CORBA::Boolean is_collocated_;
TAO_Abstract_ServantBase *servant_;