Renaming cds/cxx11_atomic.h to cds/algo/atomic.h
[libcds.git] / cds / gc / details / hp_alloc.h
index 1b53c1dab4bf2d54d4f2b96dfaee9f8c22289942..2fe84bae2838cc1d80f3dffafc1966c87ae55a1a 100644 (file)
@@ -3,7 +3,7 @@
 #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>
 
@@ -231,7 +231,7 @@ namespace cds {
             }
 
             /// Allocates hazard pointer
-            atomic_hazard_ptr& alloc() CDS_NOEXCEPT
+            atomic_hazard_ptr& alloc()
             {
                 assert( m_nTop > 0 );
                 --m_nTop;
@@ -244,7 +244,6 @@ namespace cds {
                 assert( m_nTop < capacity() );
                 hp.clear();
                 ++m_nTop;
-                CDS_COMPILER_RW_BARRIER ;   // ???
             }
 
             /// Allocates hazard pointers array
@@ -253,7 +252,7 @@ namespace cds {
                 Returns initialized object \p arr
             */
             template <size_t Count>
-            void alloc( hp_array<Count>& arr ) CDS_NOEXCEPT
+            void alloc( hp_array<Count>& arr )
             {
                 assert( m_nTop >= Count );
                 m_nTop -= Count;
@@ -267,9 +266,11 @@ namespace cds {
             template <size_t Count>
             void free( hp_array<Count> const& arr ) CDS_NOEXCEPT
             {
+                CDS_UNUSED( arr );
+
                 assert( m_nTop + Count <= capacity());
                 for ( size_t i = m_nTop; i < m_nTop + Count; ++i )
-                    m_arrHazardPtr[ i ].clear();
+                    m_arrHazardPtr[i].clear();
                 m_nTop += Count;
             }
 
@@ -290,7 +291,7 @@ namespace cds {
             void make_free() CDS_NOEXCEPT
             {
                 for ( size_t i = 0; i < capacity(); ++i )
-                    m_arrHazardPtr[ i ].clear();
+                    m_arrHazardPtr[i].clear();
                 m_nTop = capacity();
             }