formatting
[libcds.git] / cds / gc / dhp.h
index 5772cc9708f1e74020a943b46fe81c7e3053149a..39cc896f6b3e8e6ee58d94f6f8ba5f2712e1de8a 100644 (file)
@@ -398,7 +398,7 @@ namespace cds { namespace gc {
                 retired_block* block = retired_allocator::instance().alloc();
                 assert( block->next_ == nullptr );
 
-                list_tail_ = list_tail_->next_ = block;
+                current_block_ = list_tail_ = list_tail_->next_ = block;
                 current_cell_ = block->first();
                 ++block_count_;
                 CDS_HPSTAT( ++extend_call_count_ );
@@ -685,6 +685,15 @@ namespace cds { namespace gc {
 
         %DHP is an adaptive variant of classic \p cds::gc::HP, see @ref cds_garbage_collectors_comparison "Compare HP implementation"
 
+        @note Internally, %DHP depends on free-list implementation. There are
+        DCAS-based free-list \p cds::intrusive::TaggedFreeList and more complicated CAS-based free-list
+        \p cds::intrusive::FreeList. For x86 architecture and GCC/clang, libcds selects appropriate free-list
+        based on \p -mcx16 compiler flag. You may manually disable DCAS support specifying
+        \p -DCDS_DISABLE_128BIT_ATOMIC for 64bit build or \p -DCDS_DISABLE_64BIT_ATOMIC for 32bit build
+        in compiler command line. All your projects and libcds MUST be compiled with the same flags -
+        either with DCAS support or without it.
+        For MS VC++ compiler DCAS is not supported.
+
         See \ref cds_how_to_use "How to use" section for details how to apply SMR.
     */
     class DHP
@@ -1384,7 +1393,7 @@ namespace cds { namespace gc {
         static void retire( T * p, void (* func)(void *))
         {
             dhp::thread_data* rec = dhp::smr::tls();
-            if ( !rec->retired_.push( dhp::retired_ptr( p, func )) )
+            if ( !rec->retired_.push( dhp::retired_ptr( p, func )))
                 dhp::smr::instance().scan( rec );
         }