Renaming cds/cxx11_atomic.h to cds/algo/atomic.h
authorkhizmax <libcds.dev@gmail.com>
Sat, 29 Nov 2014 12:14:49 +0000 (15:14 +0300)
committerkhizmax <libcds.dev@gmail.com>
Sat, 29 Nov 2014 12:14:49 +0000 (15:14 +0300)
35 files changed:
cds/algo/atomic.h [new file with mode: 0644]
cds/algo/elimination.h
cds/algo/flat_combining.h
cds/container/vyukov_mpmc_cycle_queue.h
cds/cxx11_atomic.h [deleted file]
cds/details/marked_ptr.h
cds/gc/details/dhp.h
cds/gc/details/hp.h
cds/gc/details/hp_alloc.h
cds/intrusive/details/michael_list_base.h
cds/intrusive/details/michael_set_base.h
cds/intrusive/details/single_link_struct.h
cds/intrusive/details/split_list_base.h
cds/intrusive/msqueue.h
cds/intrusive/optimistic_queue.h
cds/intrusive/tsigas_cycle_queue.h
cds/lock/spinlock.h
cds/memory/michael/osalloc_stat.h
cds/memory/michael/procheap_stat.h
cds/opt/options.h
cds/refcounter.h
cds/urcu/details/base.h
projects/Win/vc12/cds.vcxproj
projects/Win/vc12/cds.vcxproj.filters
projects/Win/vc14/cds.vcxproj
projects/Win/vc14/cds.vcxproj.filters
src/init.cpp
src/topology_hpux.cpp
tests/cppunit/cppunit_proxy.h
tests/cppunit/test_beans.h
tests/cppunit/thread.h
tests/test-hdr/misc/cxx11_atomic_class.cpp
tests/test-hdr/misc/cxx11_atomic_func.cpp
tests/test-hdr/misc/cxx11_convert_memory_order.h
tests/test-hdr/size_check.h

diff --git a/cds/algo/atomic.h b/cds/algo/atomic.h
new file mode 100644 (file)
index 0000000..bc33866
--- /dev/null
@@ -0,0 +1,319 @@
+//$$CDS-header$$
+
+#ifndef __CDS_CXX11_ATOMIC_H
+#define __CDS_CXX11_ATOMIC_H
+
+#include <cds/details/defs.h>
+
+namespace cds {
+
+/// C++11 Atomic library support
+/**
+    \p libcds can use the following implementations of the atomics:
+    - STL \p &lt;atomic&gt;. This is used by default
+    - \p boost.atomic for boost 1.54 and above. To use it you should define \p CDS_USE_BOOST_ATOMIC for
+      your compiler invocation, for example, for gcc specify \p -DCDS_USE_BOOST_ATOMIC
+      in command line
+    - \p libcds implementation of atomic operation according to C++11 standard as
+      specified in <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf">N3242, p.29</a>.
+      \p libcds implementation is not the full standard compliant, it provides only C++ part of standard,
+      for example, \p libcds has no static initialization of the atomic variables and some other C features.
+      However, that imlementation is enough for the library purposes. Supported architecture: x86, amd64,
+      ia64 (Itanium) 64bit, 64bit Sparc. To use \p libcds atomic you should define \p CDS_USE_LIBCDS_ATOMIC
+      in the compiler command line (\p -DCDS_USE_LIBCDS_ATOMIC for gcc/clang).
+
+      @note For Clang compiler \p libcds do not use compiler-provided \p &lt;atomic&gt; due some problems.
+      Instead, \p libcds atomic is used by default, or you can try to use \p boost.atomic.
+
+      The library defines \p atomics alias for atomic namespace:
+      - <tt>namespace atomics = std</tt> for STL
+      - <tt>namespace atomics = boost</tt> for \p boost.atomic
+      - <tt>namespace atomics = cds::cxx11_atomic</tt> for library-provided atomic implementation
+*/
+namespace cxx11_atomic {
+}} // namespace cds::cxx11_atomic
+
+//@cond
+#if defined(CDS_USE_BOOST_ATOMIC)
+    // boost atomic
+#   include <boost/version.hpp>
+#   if BOOST_VERSION >= 105400
+#       include <boost/atomic.hpp>
+        namespace atomics = boost;
+#       define CDS_CXX11_ATOMIC_BEGIN_NAMESPACE namespace boost {
+#       define CDS_CXX11_ATOMIC_END_NAMESPACE }
+#   else
+#       error "Boost version 1.54 or above is needed for boost.atomic"
+#   endif
+#elif defined(CDS_USE_LIBCDS_ATOMIC)
+    // libcds atomic
+#   include <cds/compiler/cxx11_atomic.h>
+    namespace atomics = cds::cxx11_atomic;
+#   define CDS_CXX11_ATOMIC_BEGIN_NAMESPACE namespace cds { namespace cxx11_atomic {
+#   define CDS_CXX11_ATOMIC_END_NAMESPACE }}
+#else
+    // Compiler provided C++11 atomic
+#   include <atomic>
+    namespace atomics = std;
+#   define CDS_CXX11_ATOMIC_BEGIN_NAMESPACE namespace std {
+#   define CDS_CXX11_ATOMIC_END_NAMESPACE }
+#endif
+//@endcond
+
+namespace cds {
+
+    /// Atomic primitives
+    /**
+        This namespace contains useful primitives derived from <tt>std::atomic</tt>.
+    */
+    namespace atomicity {
+
+        /// Atomic event counter.
+        /**
+            This class is based on <tt>std::atomic_size_t</tt>.
+            It uses relaxed memory ordering \p memory_order_relaxed and may be used as a statistic counter.
+        */
+        class event_counter
+        {
+            //@cond
+            atomics::atomic_size_t   m_counter;
+            //@endcond
+
+        public:
+            typedef size_t      value_type  ;       ///< Type of counter
+
+        public:
+            // Initializes event counter with zero
+            event_counter() CDS_NOEXCEPT
+                : m_counter(size_t(0))
+            {}
+
+            /// Assign operator
+            /**
+                Returns \p n.
+            */
+            value_type operator =(
+                value_type n    //< new value of the counter
+            ) CDS_NOEXCEPT
+            {
+                m_counter.exchange( n, atomics::memory_order_relaxed );
+                return n;
+            }
+
+            /// Addition
+            /**
+                Returns new value of the atomic counter.
+            */
+            size_t operator +=(
+                size_t n    ///< addendum
+            ) CDS_NOEXCEPT
+            {
+                return m_counter.fetch_add( n, atomics::memory_order_relaxed ) + n;
+            }
+
+            /// Substraction
+            /**
+                Returns new value of the atomic counter.
+            */
+            size_t operator -=(
+                size_t n    ///< subtrahend
+            ) CDS_NOEXCEPT
+            {
+                return m_counter.fetch_sub( n, atomics::memory_order_relaxed ) - n;
+            }
+
+            /// Get current value of the counter
+            operator size_t () const CDS_NOEXCEPT
+            {
+                return m_counter.load( atomics::memory_order_relaxed );
+            }
+
+            /// Preincrement
+            size_t operator ++() CDS_NOEXCEPT
+            {
+                return m_counter.fetch_add( 1, atomics::memory_order_relaxed ) + 1;
+            }
+            /// Postincrement
+            size_t operator ++(int) CDS_NOEXCEPT
+            {
+                return m_counter.fetch_add( 1, atomics::memory_order_relaxed );
+            }
+
+            /// Predecrement
+            size_t operator --() CDS_NOEXCEPT
+            {
+                return m_counter.fetch_sub( 1, atomics::memory_order_relaxed ) - 1;
+            }
+            /// Postdecrement
+            size_t operator --(int) CDS_NOEXCEPT
+            {
+                return m_counter.fetch_sub( 1, atomics::memory_order_relaxed );
+            }
+
+            /// Get current value of the counter
+            size_t get() const CDS_NOEXCEPT
+            {
+                return m_counter.load( atomics::memory_order_relaxed );
+            }
+
+            /// Resets the counter to 0
+            void reset() CDS_NOEXCEPT
+            {
+                m_counter.store( 0, atomics::memory_order_release );
+            }
+
+        };
+
+        /// Atomic item counter
+        /**
+            This class is simplified interface around <tt>std::atomic_size_t</tt>.
+            The class supports getting of current value of the counter and increment/decrement its value.
+        */
+        class item_counter
+        {
+        public:
+            typedef atomics::atomic_size_t   atomic_type ;   ///< atomic type used
+            typedef size_t counter_type    ;   ///< Integral item counter type (size_t)
+
+        private:
+            //@cond
+            atomic_type                         m_Counter   ;   ///< Atomic item counter
+            //@endcond
+
+        public:
+            /// Default ctor initializes the counter to zero.
+            item_counter()
+                : m_Counter(counter_type(0))
+            {}
+
+            /// Returns current value of the counter
+            counter_type    value(atomics::memory_order order = atomics::memory_order_relaxed) const
+            {
+                return m_Counter.load( order );
+            }
+
+            /// Same as \ref value() with relaxed memory ordering
+            operator counter_type() const
+            {
+                return value();
+            }
+
+            /// Returns underlying atomic interface
+            atomic_type&  getAtomic()
+            {
+                return m_Counter;
+            }
+
+            /// Returns underlying atomic interface (const)
+            const atomic_type&  getAtomic() const
+            {
+                return m_Counter;
+            }
+
+            /// Increments the counter. Semantics: postincrement
+            counter_type inc(atomics::memory_order order = atomics::memory_order_relaxed )
+            {
+                return m_Counter.fetch_add( 1, order );
+            }
+
+            /// Decrements the counter. Semantics: postdecrement
+            counter_type dec(atomics::memory_order order = atomics::memory_order_relaxed)
+            {
+                return m_Counter.fetch_sub( 1, order );
+            }
+
+            /// Preincrement
+            counter_type operator ++()
+            {
+                return inc() + 1;
+            }
+            /// Postincrement
+            counter_type operator ++(int)
+            {
+                return inc();
+            }
+
+            /// Predecrement
+            counter_type operator --()
+            {
+                return dec() - 1;
+            }
+            /// Postdecrement
+            counter_type operator --(int)
+            {
+                return dec();
+            }
+
+            /// Resets count to 0
+            void reset(atomics::memory_order order = atomics::memory_order_relaxed)
+            {
+                m_Counter.store( 0, order );
+            }
+        };
+
+        /// Empty item counter
+        /**
+            This class may be used instead of \ref item_counter when you do not need full \ref item_counter interface.
+            All methods of the class is empty and returns 0.
+
+            The object of this class should not be used in data structure that behavior significantly depends on item counting
+            (for example, in many hash map implementation).
+        */
+        class empty_item_counter {
+        public:
+            typedef size_t counter_type    ;  ///< Counter type
+        public:
+            /// Returns 0
+            counter_type    value(atomics::memory_order /*order*/ = atomics::memory_order_relaxed) const
+            {
+                return 0;
+            }
+
+            /// Same as \ref value(), always returns 0.
+            operator counter_type() const
+            {
+                return value();
+            }
+
+            /// Dummy increment. Always returns 0
+            size_t inc(atomics::memory_order /*order*/ = atomics::memory_order_relaxed)
+            {
+                return 0;
+            }
+
+            /// Dummy increment. Always returns 0
+            size_t dec(atomics::memory_order /*order*/ = atomics::memory_order_relaxed)
+            {
+                return 0;
+            }
+
+            /// Dummy pre-increment. Always returns 0
+            size_t operator ++()
+            {
+                return 0;
+            }
+            /// Dummy post-increment. Always returns 0
+            size_t operator ++(int)
+            {
+                return 0;
+            }
+
+            /// Dummy pre-decrement. Always returns 0
+            size_t operator --()
+            {
+                return 0;
+            }
+            /// Dummy post-decrement. Always returns 0
+            size_t operator --(int)
+            {
+                return 0;
+            }
+
+            /// Dummy function
+            void reset(atomics::memory_order /*order*/ = atomics::memory_order_relaxed)
+            {}
+        };
+    }   // namespace atomicity
+}   // namespace cds
+
+#endif // #ifndef __CDS_CXX11_ATOMIC_H
index e85207b69441e600908866390067a1e1bfd16aaa..67e071ba304030db9f2a110b86a79b8547454075 100644 (file)
@@ -5,7 +5,7 @@
 
 #include <cds/algo/elimination_tls.h>
 #include <cds/algo/elimination_opt.h>
 
 #include <cds/algo/elimination_tls.h>
 #include <cds/algo/elimination_opt.h>
-#include <cds/cxx11_atomic.h>
+#include <cds/algo/atomic.h>
 #include <cds/threading/model.h>
 
 namespace cds { namespace algo {
 #include <cds/threading/model.h>
 
 namespace cds { namespace algo {
index 486fe7247bb8c870e7c5d25571d02aeec977e871..19fc20bdd9ad3d60adfbfc17e5c7f8f7279bd20b 100644 (file)
@@ -4,7 +4,7 @@
 #define __CDS_ALGO_FLAT_COMBINING_H
 
 #include <mutex>
 #define __CDS_ALGO_FLAT_COMBINING_H
 
 #include <mutex>
-#include <cds/cxx11_atomic.h>
+#include <cds/algo/atomic.h>
 #include <cds/details/allocator.h>
 #include <cds/algo/backoff_strategy.h>
 #include <cds/lock/spinlock.h>
 #include <cds/details/allocator.h>
 #include <cds/algo/backoff_strategy.h>
 #include <cds/lock/spinlock.h>
index b6fc3efa4f36b280d56a6d4c2283ad05cf2762b4..94f2c6741ccd18dda39315081e3e7196d021d83c 100644 (file)
@@ -6,7 +6,7 @@
 #include <cds/container/details/base.h>
 #include <cds/opt/buffer.h>
 #include <cds/opt/value_cleaner.h>
 #include <cds/container/details/base.h>
 #include <cds/opt/buffer.h>
 #include <cds/opt/value_cleaner.h>
-#include <cds/cxx11_atomic.h>
+#include <cds/algo/atomic.h>
 #include <cds/details/bounded_container.h>
 
 namespace cds { namespace container {
 #include <cds/details/bounded_container.h>
 
 namespace cds { namespace container {
diff --git a/cds/cxx11_atomic.h b/cds/cxx11_atomic.h
deleted file mode 100644 (file)
index bc33866..0000000
+++ /dev/null
@@ -1,319 +0,0 @@
-//$$CDS-header$$
-
-#ifndef __CDS_CXX11_ATOMIC_H
-#define __CDS_CXX11_ATOMIC_H
-
-#include <cds/details/defs.h>
-
-namespace cds {
-
-/// C++11 Atomic library support
-/**
-    \p libcds can use the following implementations of the atomics:
-    - STL \p &lt;atomic&gt;. This is used by default
-    - \p boost.atomic for boost 1.54 and above. To use it you should define \p CDS_USE_BOOST_ATOMIC for
-      your compiler invocation, for example, for gcc specify \p -DCDS_USE_BOOST_ATOMIC
-      in command line
-    - \p libcds implementation of atomic operation according to C++11 standard as
-      specified in <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf">N3242, p.29</a>.
-      \p libcds implementation is not the full standard compliant, it provides only C++ part of standard,
-      for example, \p libcds has no static initialization of the atomic variables and some other C features.
-      However, that imlementation is enough for the library purposes. Supported architecture: x86, amd64,
-      ia64 (Itanium) 64bit, 64bit Sparc. To use \p libcds atomic you should define \p CDS_USE_LIBCDS_ATOMIC
-      in the compiler command line (\p -DCDS_USE_LIBCDS_ATOMIC for gcc/clang).
-
-      @note For Clang compiler \p libcds do not use compiler-provided \p &lt;atomic&gt; due some problems.
-      Instead, \p libcds atomic is used by default, or you can try to use \p boost.atomic.
-
-      The library defines \p atomics alias for atomic namespace:
-      - <tt>namespace atomics = std</tt> for STL
-      - <tt>namespace atomics = boost</tt> for \p boost.atomic
-      - <tt>namespace atomics = cds::cxx11_atomic</tt> for library-provided atomic implementation
-*/
-namespace cxx11_atomic {
-}} // namespace cds::cxx11_atomic
-
-//@cond
-#if defined(CDS_USE_BOOST_ATOMIC)
-    // boost atomic
-#   include <boost/version.hpp>
-#   if BOOST_VERSION >= 105400
-#       include <boost/atomic.hpp>
-        namespace atomics = boost;
-#       define CDS_CXX11_ATOMIC_BEGIN_NAMESPACE namespace boost {
-#       define CDS_CXX11_ATOMIC_END_NAMESPACE }
-#   else
-#       error "Boost version 1.54 or above is needed for boost.atomic"
-#   endif
-#elif defined(CDS_USE_LIBCDS_ATOMIC)
-    // libcds atomic
-#   include <cds/compiler/cxx11_atomic.h>
-    namespace atomics = cds::cxx11_atomic;
-#   define CDS_CXX11_ATOMIC_BEGIN_NAMESPACE namespace cds { namespace cxx11_atomic {
-#   define CDS_CXX11_ATOMIC_END_NAMESPACE }}
-#else
-    // Compiler provided C++11 atomic
-#   include <atomic>
-    namespace atomics = std;
-#   define CDS_CXX11_ATOMIC_BEGIN_NAMESPACE namespace std {
-#   define CDS_CXX11_ATOMIC_END_NAMESPACE }
-#endif
-//@endcond
-
-namespace cds {
-
-    /// Atomic primitives
-    /**
-        This namespace contains useful primitives derived from <tt>std::atomic</tt>.
-    */
-    namespace atomicity {
-
-        /// Atomic event counter.
-        /**
-            This class is based on <tt>std::atomic_size_t</tt>.
-            It uses relaxed memory ordering \p memory_order_relaxed and may be used as a statistic counter.
-        */
-        class event_counter
-        {
-            //@cond
-            atomics::atomic_size_t   m_counter;
-            //@endcond
-
-        public:
-            typedef size_t      value_type  ;       ///< Type of counter
-
-        public:
-            // Initializes event counter with zero
-            event_counter() CDS_NOEXCEPT
-                : m_counter(size_t(0))
-            {}
-
-            /// Assign operator
-            /**
-                Returns \p n.
-            */
-            value_type operator =(
-                value_type n    //< new value of the counter
-            ) CDS_NOEXCEPT
-            {
-                m_counter.exchange( n, atomics::memory_order_relaxed );
-                return n;
-            }
-
-            /// Addition
-            /**
-                Returns new value of the atomic counter.
-            */
-            size_t operator +=(
-                size_t n    ///< addendum
-            ) CDS_NOEXCEPT
-            {
-                return m_counter.fetch_add( n, atomics::memory_order_relaxed ) + n;
-            }
-
-            /// Substraction
-            /**
-                Returns new value of the atomic counter.
-            */
-            size_t operator -=(
-                size_t n    ///< subtrahend
-            ) CDS_NOEXCEPT
-            {
-                return m_counter.fetch_sub( n, atomics::memory_order_relaxed ) - n;
-            }
-
-            /// Get current value of the counter
-            operator size_t () const CDS_NOEXCEPT
-            {
-                return m_counter.load( atomics::memory_order_relaxed );
-            }
-
-            /// Preincrement
-            size_t operator ++() CDS_NOEXCEPT
-            {
-                return m_counter.fetch_add( 1, atomics::memory_order_relaxed ) + 1;
-            }
-            /// Postincrement
-            size_t operator ++(int) CDS_NOEXCEPT
-            {
-                return m_counter.fetch_add( 1, atomics::memory_order_relaxed );
-            }
-
-            /// Predecrement
-            size_t operator --() CDS_NOEXCEPT
-            {
-                return m_counter.fetch_sub( 1, atomics::memory_order_relaxed ) - 1;
-            }
-            /// Postdecrement
-            size_t operator --(int) CDS_NOEXCEPT
-            {
-                return m_counter.fetch_sub( 1, atomics::memory_order_relaxed );
-            }
-
-            /// Get current value of the counter
-            size_t get() const CDS_NOEXCEPT
-            {
-                return m_counter.load( atomics::memory_order_relaxed );
-            }
-
-            /// Resets the counter to 0
-            void reset() CDS_NOEXCEPT
-            {
-                m_counter.store( 0, atomics::memory_order_release );
-            }
-
-        };
-
-        /// Atomic item counter
-        /**
-            This class is simplified interface around <tt>std::atomic_size_t</tt>.
-            The class supports getting of current value of the counter and increment/decrement its value.
-        */
-        class item_counter
-        {
-        public:
-            typedef atomics::atomic_size_t   atomic_type ;   ///< atomic type used
-            typedef size_t counter_type    ;   ///< Integral item counter type (size_t)
-
-        private:
-            //@cond
-            atomic_type                         m_Counter   ;   ///< Atomic item counter
-            //@endcond
-
-        public:
-            /// Default ctor initializes the counter to zero.
-            item_counter()
-                : m_Counter(counter_type(0))
-            {}
-
-            /// Returns current value of the counter
-            counter_type    value(atomics::memory_order order = atomics::memory_order_relaxed) const
-            {
-                return m_Counter.load( order );
-            }
-
-            /// Same as \ref value() with relaxed memory ordering
-            operator counter_type() const
-            {
-                return value();
-            }
-
-            /// Returns underlying atomic interface
-            atomic_type&  getAtomic()
-            {
-                return m_Counter;
-            }
-
-            /// Returns underlying atomic interface (const)
-            const atomic_type&  getAtomic() const
-            {
-                return m_Counter;
-            }
-
-            /// Increments the counter. Semantics: postincrement
-            counter_type inc(atomics::memory_order order = atomics::memory_order_relaxed )
-            {
-                return m_Counter.fetch_add( 1, order );
-            }
-
-            /// Decrements the counter. Semantics: postdecrement
-            counter_type dec(atomics::memory_order order = atomics::memory_order_relaxed)
-            {
-                return m_Counter.fetch_sub( 1, order );
-            }
-
-            /// Preincrement
-            counter_type operator ++()
-            {
-                return inc() + 1;
-            }
-            /// Postincrement
-            counter_type operator ++(int)
-            {
-                return inc();
-            }
-
-            /// Predecrement
-            counter_type operator --()
-            {
-                return dec() - 1;
-            }
-            /// Postdecrement
-            counter_type operator --(int)
-            {
-                return dec();
-            }
-
-            /// Resets count to 0
-            void reset(atomics::memory_order order = atomics::memory_order_relaxed)
-            {
-                m_Counter.store( 0, order );
-            }
-        };
-
-        /// Empty item counter
-        /**
-            This class may be used instead of \ref item_counter when you do not need full \ref item_counter interface.
-            All methods of the class is empty and returns 0.
-
-            The object of this class should not be used in data structure that behavior significantly depends on item counting
-            (for example, in many hash map implementation).
-        */
-        class empty_item_counter {
-        public:
-            typedef size_t counter_type    ;  ///< Counter type
-        public:
-            /// Returns 0
-            counter_type    value(atomics::memory_order /*order*/ = atomics::memory_order_relaxed) const
-            {
-                return 0;
-            }
-
-            /// Same as \ref value(), always returns 0.
-            operator counter_type() const
-            {
-                return value();
-            }
-
-            /// Dummy increment. Always returns 0
-            size_t inc(atomics::memory_order /*order*/ = atomics::memory_order_relaxed)
-            {
-                return 0;
-            }
-
-            /// Dummy increment. Always returns 0
-            size_t dec(atomics::memory_order /*order*/ = atomics::memory_order_relaxed)
-            {
-                return 0;
-            }
-
-            /// Dummy pre-increment. Always returns 0
-            size_t operator ++()
-            {
-                return 0;
-            }
-            /// Dummy post-increment. Always returns 0
-            size_t operator ++(int)
-            {
-                return 0;
-            }
-
-            /// Dummy pre-decrement. Always returns 0
-            size_t operator --()
-            {
-                return 0;
-            }
-            /// Dummy post-decrement. Always returns 0
-            size_t operator --(int)
-            {
-                return 0;
-            }
-
-            /// Dummy function
-            void reset(atomics::memory_order /*order*/ = atomics::memory_order_relaxed)
-            {}
-        };
-    }   // namespace atomicity
-}   // namespace cds
-
-#endif // #ifndef __CDS_CXX11_ATOMIC_H
index 9471d67a7df0999237e896a1db0b9beec5519059..040bcb99b4595bafbd10f20c31646c580f45ba99 100644 (file)
@@ -3,7 +3,7 @@
 #ifndef __CDS_DETAILS_MARKED_PTR_H
 #define __CDS_DETAILS_MARKED_PTR_H
 
 #ifndef __CDS_DETAILS_MARKED_PTR_H
 #define __CDS_DETAILS_MARKED_PTR_H
 
-#include <cds/cxx11_atomic.h>
+#include <cds/algo/atomic.h>
 
 namespace cds {
     namespace details {
 
 namespace cds {
     namespace details {
index 8f177c37e448f403965bb6cdba86b8581582b6cf..7c918baeebf84760d69deebe9af6bd3d8c60e554 100644 (file)
@@ -4,7 +4,7 @@
 #define __CDS_GC_DETAILS_DHP_H
 
 #include <mutex>        // unique_lock
 #define __CDS_GC_DETAILS_DHP_H
 
 #include <mutex>        // unique_lock
-#include <cds/cxx11_atomic.h>
+#include <cds/algo/atomic.h>
 #include <cds/gc/details/retired_ptr.h>
 #include <cds/details/aligned_allocator.h>
 #include <cds/details/allocator.h>
 #include <cds/gc/details/retired_ptr.h>
 #include <cds/details/aligned_allocator.h>
 #include <cds/details/allocator.h>
index c58192d9630b16fa0abcc2fdc0c272fa1e88df08..70d71da2a2408d9518d895f0f8575f36dc91bd56 100644 (file)
@@ -3,7 +3,7 @@
 #ifndef __CDS_GC_DETAILS_HP_H
 #define __CDS_GC_DETAILS_HP_H
 
 #ifndef __CDS_GC_DETAILS_HP_H
 #define __CDS_GC_DETAILS_HP_H
 
-#include <cds/cxx11_atomic.h>
+#include <cds/algo/atomic.h>
 #include <cds/os/thread.h>
 #include <cds/details/bounded_array.h>
 
 #include <cds/os/thread.h>
 #include <cds/details/bounded_array.h>
 
index ae0ac4098ef564730647f499e71dbb67c9d2d3bb..2fe84bae2838cc1d80f3dffafc1966c87ae55a1a 100644 (file)
@@ -3,7 +3,7 @@
 #ifndef __CDS_GC_DETAILS_HP_ALLOC_H
 #define __CDS_GC_DETAILS_HP_ALLOC_H
 
 #ifndef __CDS_GC_DETAILS_HP_ALLOC_H
 #define __CDS_GC_DETAILS_HP_ALLOC_H
 
-#include <cds/cxx11_atomic.h>
+#include <cds/algo/atomic.h>
 #include <cds/details/allocator.h>
 #include <cds/gc/details/hp_type.h>
 
 #include <cds/details/allocator.h>
 #include <cds/gc/details/hp_type.h>
 
index 023714a31f3b8126b275efd6b156a101eb451886..684289044f2d384c5bc1d6965127392969648996 100644 (file)
@@ -6,7 +6,7 @@
 #include <type_traits>
 #include <cds/intrusive/details/base.h>
 #include <cds/opt/compare.h>
 #include <type_traits>
 #include <cds/intrusive/details/base.h>
 #include <cds/opt/compare.h>
-#include <cds/cxx11_atomic.h>
+#include <cds/algo/atomic.h>
 #include <cds/details/marked_ptr.h>
 #include <cds/urcu/options.h>
 
 #include <cds/details/marked_ptr.h>
 #include <cds/urcu/options.h>
 
index 79f3549b4bfcb31941cefe9c0a8cdc77a87ef8bf..757d05e33f4d9eab9d8f2d0811f6cbf08f19c762 100644 (file)
@@ -7,7 +7,7 @@
 #include <cds/opt/compare.h>
 #include <cds/opt/hash.h>
 #include <cds/algo/bitop.h>
 #include <cds/opt/compare.h>
 #include <cds/opt/hash.h>
 #include <cds/algo/bitop.h>
-#include <cds/cxx11_atomic.h>
+#include <cds/algo/atomic.h>
 
 namespace cds { namespace intrusive {
 
 
 namespace cds { namespace intrusive {
 
index b783cc064cae29fea6d63d1920cd5ae7dabdb963..5a2758e0b15e13e900e64c4822160ff9e67f13f1 100644 (file)
@@ -5,7 +5,7 @@
 
 #include <cds/intrusive/details/base.h>
 #include <cds/gc/default_gc.h>
 
 #include <cds/intrusive/details/base.h>
 #include <cds/gc/default_gc.h>
-#include <cds/cxx11_atomic.h>
+#include <cds/algo/atomic.h>
 
 namespace cds { namespace intrusive {
 
 
 namespace cds { namespace intrusive {
 
index 744ee9349a0d700c86fb3feb3c700550bf626ca3..758e352ebc82b7df8822572c02a5a16ddb100fef 100644 (file)
@@ -4,7 +4,7 @@
 #define __CDS_INTRUSIVE_DETAILS_SPLIT_LIST_BASE_H
 
 #include <cds/intrusive/details/base.h>
 #define __CDS_INTRUSIVE_DETAILS_SPLIT_LIST_BASE_H
 
 #include <cds/intrusive/details/base.h>
-#include <cds/cxx11_atomic.h>
+#include <cds/algo/atomic.h>
 #include <cds/details/allocator.h>
 #include <cds/algo/int_algo.h>
 #include <cds/algo/bitop.h>
 #include <cds/details/allocator.h>
 #include <cds/algo/int_algo.h>
 #include <cds/algo/bitop.h>
index c0c363efdfc00891ad034d8e69616b143cdbfa60..2fad6f9634076a1c4fee488b56dcdd1355d1d2db 100644 (file)
@@ -5,7 +5,7 @@
 
 #include <type_traits>
 #include <cds/intrusive/details/single_link_struct.h>
 
 #include <type_traits>
 #include <cds/intrusive/details/single_link_struct.h>
-#include <cds/cxx11_atomic.h>
+#include <cds/algo/atomic.h>
 
 namespace cds { namespace intrusive {
 
 
 namespace cds { namespace intrusive {
 
index 5009efac4c54ed14c2aa16fb80fae4eef35ddc60..f2b4254358241cdc2f0c19f81e1bd47d834db9d6 100644 (file)
@@ -5,7 +5,7 @@
 
 #include <type_traits>
 #include <cds/intrusive/details/base.h>
 
 #include <type_traits>
 #include <cds/intrusive/details/base.h>
-#include <cds/cxx11_atomic.h>
+#include <cds/algo/atomic.h>
 #include <cds/gc/default_gc.h>
 
 namespace cds { namespace intrusive {
 #include <cds/gc/default_gc.h>
 
 namespace cds { namespace intrusive {
index 20981f756b85c826412798eb286c2d35a7a302b4..202feb12aa549dd616f5a53bd7165a4eda899f91 100644 (file)
@@ -4,7 +4,7 @@
 #define __CDS_INTRUSIVE_TSIGAS_CYCLE_QUEUE_H
 
 #include <cds/intrusive/details/base.h>
 #define __CDS_INTRUSIVE_TSIGAS_CYCLE_QUEUE_H
 
 #include <cds/intrusive/details/base.h>
-#include <cds/cxx11_atomic.h>
+#include <cds/algo/atomic.h>
 #include <cds/details/bounded_container.h>
 #include <cds/opt/buffer.h>
 
 #include <cds/details/bounded_container.h>
 #include <cds/opt/buffer.h>
 
index dbe729db8c8ccad29eb6b346234c1174fd671392..80460a82758b8cf607823917ff2095622eef151a 100644 (file)
@@ -12,7 +12,7 @@
         2006              khizmax     Created
 */
 
         2006              khizmax     Created
 */
 
-#include <cds/cxx11_atomic.h>
+#include <cds/algo/atomic.h>
 #include <cds/os/thread.h>
 #include <cds/algo/backoff_strategy.h>
 
 #include <cds/os/thread.h>
 #include <cds/algo/backoff_strategy.h>
 
index 52d861ec31c3dfdbaddee32b9d69604093abe5f4..2a842e1056ad247caa49702fb402b0d0286a3da6 100644 (file)
@@ -3,7 +3,7 @@
 #ifndef __CDS_MEMORY_MICHAEL_ALLOCATOR_OSALLOC_STAT_H
 #define __CDS_MEMORY_MICHAEL_ALLOCATOR_OSALLOC_STAT_H
 
 #ifndef __CDS_MEMORY_MICHAEL_ALLOCATOR_OSALLOC_STAT_H
 #define __CDS_MEMORY_MICHAEL_ALLOCATOR_OSALLOC_STAT_H
 
-#include <cds/cxx11_atomic.h>
+#include <cds/algo/atomic.h>
 
 namespace cds { namespace memory { namespace michael {
 
 
 namespace cds { namespace memory { namespace michael {
 
index 1200a8927d08a1d100165fe15513045f71947501..308cad965399cb68d8ab7af9cc2d7c708ed2d786 100644 (file)
@@ -3,7 +3,7 @@
 #ifndef __CDS_MEMORY_MICHAEL_ALLOCATOR_PROCHEAP_STAT_H
 #define __CDS_MEMORY_MICHAEL_ALLOCATOR_PROCHEAP_STAT_H
 
 #ifndef __CDS_MEMORY_MICHAEL_ALLOCATOR_PROCHEAP_STAT_H
 #define __CDS_MEMORY_MICHAEL_ALLOCATOR_PROCHEAP_STAT_H
 
-#include <cds/cxx11_atomic.h>
+#include <cds/algo/atomic.h>
 
 namespace cds { namespace memory { namespace michael {
 
 
 namespace cds { namespace memory { namespace michael {
 
index 0c2f7e9541c4d32a989ffd8a0880cd215ba6a42b..7b9c3d854ddb46ea6c3bd07b5906a41dd50e9240 100644 (file)
@@ -13,7 +13,7 @@
 #include <cds/details/aligned_type.h>
 #include <cds/user_setup/allocator.h>
 #include <cds/user_setup/cache_line.h>
 #include <cds/details/aligned_type.h>
 #include <cds/user_setup/allocator.h>
 #include <cds/user_setup/cache_line.h>
-#include <cds/cxx11_atomic.h>
+#include <cds/algo/atomic.h>
 #include <stdlib.h> // rand, srand
 
 namespace cds {
 #include <stdlib.h> // rand, srand
 
 namespace cds {
index 3ccdfce27b249b789ba18a2da50b5e3c7142ddf4..69ca30a042a63eca86616596e4e5040f3c5567b5 100644 (file)
@@ -9,7 +9,7 @@
     Editions:
 */
 
     Editions:
 */
 
-#include <cds/cxx11_atomic.h>
+#include <cds/algo/atomic.h>
 
 namespace cds {
 
 
 namespace cds {
 
index 5795d2d26119e404255dfa6d2a1e2fb433889a74..b008581d78b496bfb8f9c639e1a97a089ebf3441 100644 (file)
@@ -3,7 +3,7 @@
 #ifndef _CDS_URCU_DETAILS_BASE_H
 #define _CDS_URCU_DETAILS_BASE_H
 
 #ifndef _CDS_URCU_DETAILS_BASE_H
 #define _CDS_URCU_DETAILS_BASE_H
 
-#include <cds/cxx11_atomic.h>
+#include <cds/algo/atomic.h>
 #include <cds/gc/details/retired_ptr.h>
 #include <cds/details/allocator.h>
 #include <cds/os/thread.h>
 #include <cds/gc/details/retired_ptr.h>
 #include <cds/details/allocator.h>
 #include <cds/os/thread.h>
index 8ec88bc1e3f28a2bb8b8ae767213ab26e019ce4e..36061e799a5b6246a75bbd4a5ac5094ee79724c3 100644 (file)
     <ClCompile Include="..\..\..\src\urcu_sh.cpp" />\r
   </ItemGroup>\r
   <ItemGroup>\r
     <ClCompile Include="..\..\..\src\urcu_sh.cpp" />\r
   </ItemGroup>\r
   <ItemGroup>\r
+    <ClInclude Include="..\..\..\cds\algo\atomic.h" />\r
     <ClInclude Include="..\..\..\cds\algo\backoff_strategy.h" />\r
     <ClInclude Include="..\..\..\cds\algo\base.h" />\r
     <ClInclude Include="..\..\..\cds\algo\bitop.h" />\r
     <ClInclude Include="..\..\..\cds\algo\backoff_strategy.h" />\r
     <ClInclude Include="..\..\..\cds\algo\base.h" />\r
     <ClInclude Include="..\..\..\cds\algo\bitop.h" />\r
     <ClInclude Include="..\..\..\cds\container\striped_set\std_list.h" />\r
     <ClInclude Include="..\..\..\cds\container\striped_set\std_set.h" />\r
     <ClInclude Include="..\..\..\cds\container\striped_set\std_vector.h" />\r
     <ClInclude Include="..\..\..\cds\container\striped_set\std_list.h" />\r
     <ClInclude Include="..\..\..\cds\container\striped_set\std_set.h" />\r
     <ClInclude Include="..\..\..\cds\container\striped_set\std_vector.h" />\r
-    <ClInclude Include="..\..\..\cds\cxx11_atomic.h" />\r
     <ClInclude Include="..\..\..\cds\details\binary_functor_wrapper.h" />\r
     <ClInclude Include="..\..\..\cds\details\bit_reverse_counter.h" />\r
     <ClInclude Include="..\..\..\cds\details\bounded_container.h" />\r
     <ClInclude Include="..\..\..\cds\details\binary_functor_wrapper.h" />\r
     <ClInclude Include="..\..\..\cds\details\bit_reverse_counter.h" />\r
     <ClInclude Include="..\..\..\cds\details\bounded_container.h" />\r
index cbe94f2b840af33ebb93f755a3f36bd793c6e5a1..e2373d1a6b567f7ce6c70c661830a6b676f50450 100644 (file)
     <ClInclude Include="..\..\..\cds\compiler\gcc\x86\cxx11_atomic.h">\r
       <Filter>Header Files\cds\compiler\gcc\x86</Filter>\r
     </ClInclude>\r
     <ClInclude Include="..\..\..\cds\compiler\gcc\x86\cxx11_atomic.h">\r
       <Filter>Header Files\cds\compiler\gcc\x86</Filter>\r
     </ClInclude>\r
-    <ClInclude Include="..\..\..\cds\cxx11_atomic.h">\r
-      <Filter>Header Files\cds</Filter>\r
-    </ClInclude>\r
     <ClInclude Include="..\..\..\cds\compiler\gcc\sparc\cxx11_atomic.h">\r
       <Filter>Header Files\cds\compiler\gcc\sparc</Filter>\r
     </ClInclude>\r
     <ClInclude Include="..\..\..\cds\compiler\gcc\sparc\cxx11_atomic.h">\r
       <Filter>Header Files\cds\compiler\gcc\sparc</Filter>\r
     </ClInclude>\r
     <ClInclude Include="..\..\..\cds\gc\impl\hp_impl.h">\r
       <Filter>Header Files\cds\gc\impl</Filter>\r
     </ClInclude>\r
     <ClInclude Include="..\..\..\cds\gc\impl\hp_impl.h">\r
       <Filter>Header Files\cds\gc\impl</Filter>\r
     </ClInclude>\r
+    <ClInclude Include="..\..\..\cds\algo\atomic.h">\r
+      <Filter>Header Files\cds\algo</Filter>\r
+    </ClInclude>\r
   </ItemGroup>\r
 </Project>
\ No newline at end of file
   </ItemGroup>\r
 </Project>
\ No newline at end of file
index 7ea67a348977e8b47567f5520440180aaa556ad1..4cfec11a8ac8693af295d66daef7b2c2cb0039f2 100644 (file)
     <ClCompile Include="..\..\..\src\urcu_sh.cpp" />\r
   </ItemGroup>\r
   <ItemGroup>\r
     <ClCompile Include="..\..\..\src\urcu_sh.cpp" />\r
   </ItemGroup>\r
   <ItemGroup>\r
+    <ClInclude Include="..\..\..\cds\algo\atomic.h" />\r
     <ClInclude Include="..\..\..\cds\algo\backoff_strategy.h" />\r
     <ClInclude Include="..\..\..\cds\algo\base.h" />\r
     <ClInclude Include="..\..\..\cds\algo\bitop.h" />\r
     <ClInclude Include="..\..\..\cds\algo\backoff_strategy.h" />\r
     <ClInclude Include="..\..\..\cds\algo\base.h" />\r
     <ClInclude Include="..\..\..\cds\algo\bitop.h" />\r
     <ClInclude Include="..\..\..\cds\container\striped_set\std_list.h" />\r
     <ClInclude Include="..\..\..\cds\container\striped_set\std_set.h" />\r
     <ClInclude Include="..\..\..\cds\container\striped_set\std_vector.h" />\r
     <ClInclude Include="..\..\..\cds\container\striped_set\std_list.h" />\r
     <ClInclude Include="..\..\..\cds\container\striped_set\std_set.h" />\r
     <ClInclude Include="..\..\..\cds\container\striped_set\std_vector.h" />\r
-    <ClInclude Include="..\..\..\cds\cxx11_atomic.h" />\r
     <ClInclude Include="..\..\..\cds\details\binary_functor_wrapper.h" />\r
     <ClInclude Include="..\..\..\cds\details\bit_reverse_counter.h" />\r
     <ClInclude Include="..\..\..\cds\details\bounded_container.h" />\r
     <ClInclude Include="..\..\..\cds\details\binary_functor_wrapper.h" />\r
     <ClInclude Include="..\..\..\cds\details\bit_reverse_counter.h" />\r
     <ClInclude Include="..\..\..\cds\details\bounded_container.h" />\r
index cbe94f2b840af33ebb93f755a3f36bd793c6e5a1..e2373d1a6b567f7ce6c70c661830a6b676f50450 100644 (file)
     <ClInclude Include="..\..\..\cds\compiler\gcc\x86\cxx11_atomic.h">\r
       <Filter>Header Files\cds\compiler\gcc\x86</Filter>\r
     </ClInclude>\r
     <ClInclude Include="..\..\..\cds\compiler\gcc\x86\cxx11_atomic.h">\r
       <Filter>Header Files\cds\compiler\gcc\x86</Filter>\r
     </ClInclude>\r
-    <ClInclude Include="..\..\..\cds\cxx11_atomic.h">\r
-      <Filter>Header Files\cds</Filter>\r
-    </ClInclude>\r
     <ClInclude Include="..\..\..\cds\compiler\gcc\sparc\cxx11_atomic.h">\r
       <Filter>Header Files\cds\compiler\gcc\sparc</Filter>\r
     </ClInclude>\r
     <ClInclude Include="..\..\..\cds\compiler\gcc\sparc\cxx11_atomic.h">\r
       <Filter>Header Files\cds\compiler\gcc\sparc</Filter>\r
     </ClInclude>\r
     <ClInclude Include="..\..\..\cds\gc\impl\hp_impl.h">\r
       <Filter>Header Files\cds\gc\impl</Filter>\r
     </ClInclude>\r
     <ClInclude Include="..\..\..\cds\gc\impl\hp_impl.h">\r
       <Filter>Header Files\cds\gc\impl</Filter>\r
     </ClInclude>\r
+    <ClInclude Include="..\..\..\cds\algo\atomic.h">\r
+      <Filter>Header Files\cds\algo</Filter>\r
+    </ClInclude>\r
   </ItemGroup>\r
 </Project>
\ No newline at end of file
   </ItemGroup>\r
 </Project>
\ No newline at end of file
index 4ca8614ec5f37577a2d345d98607b5048cb2b5bb..40243613472b0d0fa0600b94a93f8f0629e3b58e 100644 (file)
@@ -1,7 +1,7 @@
 //$$CDS-header$$
 
 #include <cds/init.h>
 //$$CDS-header$$
 
 #include <cds/init.h>
-#include <cds/cxx11_atomic.h>
+#include <cds/algo/atomic.h>
 
 #if CDS_OS_INTERFACE == CDS_OSI_WINDOWS
 #   if CDS_COMPILER == CDS_COMPILER_MSVC || CDS_COMPILER == CDS_COMPILER_INTEL
 
 #if CDS_OS_INTERFACE == CDS_OSI_WINDOWS
 #   if CDS_COMPILER == CDS_COMPILER_MSVC || CDS_COMPILER == CDS_COMPILER_INTEL
index cc73f979663f5c2e78f7313ef9877f730394a0de..60a63d33dcfa7d9dc8d26da5ce4d6e6839e22b04 100644 (file)
@@ -4,7 +4,7 @@
 
 #if CDS_OS_TYPE == CDS_OS_HPUX
 
 
 #if CDS_OS_TYPE == CDS_OS_HPUX
 
-#include <cds/cxx11_atomic.h>
+#include <cds/algo/atomic.h>
 #include <limits>
 
 namespace cds { namespace OS { CDS_CXX11_INLINE_NAMESPACE namespace Hpux {
 #include <limits>
 
 namespace cds { namespace OS { CDS_CXX11_INLINE_NAMESPACE namespace Hpux {
index 09b02c132a3bc7c8af9173daff1c8ddcd17eb96c..a39cea4e55e291410084481a792ea0f2658bad2d 100644 (file)
@@ -29,6 +29,6 @@
 #endif
 
 #include "cppunit/cppunit_mini.h"
 #endif
 
 #include "cppunit/cppunit_mini.h"
-#include <cds/cxx11_atomic.h>   // for cds::atomicity::empty_item_counter
+#include <cds/algo/atomic.h>   // for cds::atomicity::empty_item_counter
 
 #endif
 
 #endif
index f5be0f9ee7ebb336e2114bc91c52d16e77c6be00..ae3e486493d059c2016c977b125f22532fee68a4 100644 (file)
@@ -7,7 +7,7 @@ namespace cds {
 }
 
 // Including this header is a bad thing for header testing. How to avoid it?..
 }
 
 // Including this header is a bad thing for header testing. How to avoid it?..
-#include <cds/cxx11_atomic.h>   // for cds::atomicity::empty_item_counter
+#include <cds/algo/atomic.h>   // for cds::atomicity::empty_item_counter
 
 namespace test_beans {
     template <typename ItemCounter>
 
 namespace test_beans {
     template <typename ItemCounter>
index 68a02be91f7b09f96c028df9215fe042682b83fd..468050dca27bbc7a09ac05df69942a72fbe52fa8 100644 (file)
@@ -8,7 +8,7 @@
 #include <boost/thread.hpp>
 #include <cds/os/timer.h>
 #include <cds/threading/model.h>    // for attach/detach thread
 #include <boost/thread.hpp>
 #include <cds/os/timer.h>
 #include <cds/threading/model.h>    // for attach/detach thread
-#include <cds/cxx11_atomic.h>
+#include <cds/algo/atomic.h>
 
 namespace CppUnitMini {
     static inline unsigned int Rand( unsigned int nMax )
 
 namespace CppUnitMini {
     static inline unsigned int Rand( unsigned int nMax )
index cafd6a62ef1dd9f0b7475630ec5e279825d95703..593191928a543b62efd24bc0006b63dea99267a6 100644 (file)
@@ -3,7 +3,7 @@
 #include "cppunit/cppunit_proxy.h"
 
 //#define CDS_USE_BOOST_ATOMIC
 #include "cppunit/cppunit_proxy.h"
 
 //#define CDS_USE_BOOST_ATOMIC
-#include <cds/cxx11_atomic.h>
+#include <cds/algo/atomic.h>
 
 #include "misc/cxx11_convert_memory_order.h"
 
 
 #include "misc/cxx11_convert_memory_order.h"
 
index d5f7f2f90240e2cf7e8c3a65993ba8561f58591d..e16a63d0aa79998c3d1c63f97546a4b7c847844d 100644 (file)
@@ -2,7 +2,7 @@
 
 #include "cppunit/cppunit_proxy.h"
 
 
 #include "cppunit/cppunit_proxy.h"
 
-#include <cds/cxx11_atomic.h>
+#include <cds/algo/atomic.h>
 
 #ifndef CDS_USE_BOOST_ATOMIC
 // Skip this test for boost.atomic
 
 #ifndef CDS_USE_BOOST_ATOMIC
 // Skip this test for boost.atomic
index a9dfc2436ab2e4a4f7084c6542f0c513e36670d3..ca548ef438154476dc648025c99b287ac7671080 100644 (file)
@@ -1,6 +1,6 @@
 //$$CDS-header$$
 
 //$$CDS-header$$
 
-// This header should be included AFTER <cds/cxx11_atomic.h> if needed
+// This header should be included AFTER <cds/algo/atomic.h> if needed
 
 namespace misc {
 
 
 namespace misc {
 
index 912b2d45a4d40a6fcb28df04b29485a74a2ea6dd..8b507bf2acf4b0d262a8f374737cbd0d219808ef 100644 (file)
@@ -3,7 +3,7 @@
 #ifndef __CDSTEST_SIZE_CHECK_H
 #define __CDSTEST_SIZE_CHECK_H
 
 #ifndef __CDSTEST_SIZE_CHECK_H
 #define __CDSTEST_SIZE_CHECK_H
 
-#include <cds/cxx11_atomic.h>
+#include <cds/algo/atomic.h>
 
 namespace misc {
 
 
 namespace misc {