summaryrefslogtreecommitdiff
path: root/TAO/tao/DynamicInterface/Context.h
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tao/DynamicInterface/Context.h')
-rw-r--r--TAO/tao/DynamicInterface/Context.h19
1 files changed, 15 insertions, 4 deletions
diff --git a/TAO/tao/DynamicInterface/Context.h b/TAO/tao/DynamicInterface/Context.h
index a20b50554c4..30c269457a0 100644
--- a/TAO/tao/DynamicInterface/Context.h
+++ b/TAO/tao/DynamicInterface/Context.h
@@ -31,8 +31,11 @@
#include "tao/default_environment.h"
#include "ace/Unbounded_Queue.h"
-#include "ace/Atomic_Op.h"
-#include "ace/Synch_Traits.h"
+#if defined (ACE_HAS_CPP11)
+# include <atomic>
+#else
+# include "ace/Atomic_Op.h"
+#endif /* ACE_HAS_CPP11 */
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
@@ -111,7 +114,11 @@ namespace CORBA
private:
/// Reference counter.
- ACE_Atomic_Op<TAO_SYNCH_MUTEX, CORBA::ULong> refcount_;
+#if defined (ACE_HAS_CPP11)
+ std::atomic<uint32_t> refcount_;
+#else
+ ACE_Atomic_Op<TAO_SYNCH_MUTEX, unsigned long> refcount_;
+#endif /* ACE_HAS_CPP11 */
};
/**
@@ -176,7 +183,11 @@ namespace CORBA
ContextList &operator= (const ContextList &);
/// Reference counter.
- ACE_Atomic_Op<TAO_SYNCH_MUTEX, CORBA::ULong> ref_count_;
+#if defined (ACE_HAS_CPP11)
+ std::atomic<uint32_t> refcount_;
+#else
+ ACE_Atomic_Op<TAO_SYNCH_MUTEX, unsigned long> refcount_;
+#endif /* ACE_HAS_CPP11 */
/// Internal list of typecodes.
ACE_Unbounded_Queue<char *> ctx_list_;