Fixed update desc sequencer
authorkhizmax <khizmax@gmail.com>
Thu, 1 Dec 2016 08:39:07 +0000 (11:39 +0300)
committerkhizmax <khizmax@gmail.com>
Thu, 1 Dec 2016 08:39:07 +0000 (11:39 +0300)
cds/intrusive/details/ellen_bintree_base.h

index efef4eecded87950d405f00b8bbba6cb6a85d348..41cb8b18c916fc1d4536d3be6d0511a0324fdfb7 100644 (file)
@@ -247,7 +247,7 @@ namespace cds { namespace intrusive {
             //@cond
             update_ptr null_update_desc()
             {
             //@cond
             update_ptr null_update_desc()
             {
-                return update_ptr( reinterpret_cast<update_desc_type *>( (m_nEmptyUpdate.fetch_add(1, atomics::memory_order_relaxed) << 2) & 0xFFFF ));
+                return update_ptr( reinterpret_cast<update_desc_type *>( ((m_nEmptyUpdate.fetch_add(1, atomics::memory_order_relaxed) + 1 ) << 2) & 0xFFFF ));
             }
 
             base_class * get_child( bool bRight, atomics::memory_order mo ) const
             }
 
             base_class * get_child( bool bRight, atomics::memory_order mo ) const