Doc fix
authorkhizmax <libcds.dev@gmail.com>
Sat, 5 Dec 2015 15:14:03 +0000 (18:14 +0300)
committerkhizmax <libcds.dev@gmail.com>
Sat, 5 Dec 2015 15:14:03 +0000 (18:14 +0300)
.gitignore
cds/intrusive/details/split_list_base.h
cds/intrusive/lazy_list_rcu.h
cds/intrusive/split_list_rcu.h
cds/memory/pool_allocator.h
cds/memory/vyukov_queue_pool.h

index d34994c1855d428ebb3326ebb6e93fc6c47a98bb..6107723e45a0be82f47bee20911974dd240b2efd 100644 (file)
@@ -18,3 +18,4 @@
 /todo-2.1.txt
 *.log
 /.project
+/projects/Win/vc14/*.opendb
index e6d22ccaadb85f184ad762bdb95b293e2a5362c0..07557e0422761e4b63c5e4b62c0d3dca7d22783c 100644 (file)
@@ -707,12 +707,10 @@ namespace cds { namespace intrusive {
                     void operator()( value_type * v )
                     {
                         splitlist_node_type * p = static_cast<splitlist_node_type *>( node_traits::to_node_ptr( v ));
-                        if ( p->is_dummy() ) {
+                        if ( p->is_dummy() )
                             dummy_node_disposer<gc, typename traits::allocator>()( p );
-                        }
-                        else {
+                        else
                             native_disposer()( v );
-                        }
                     }
                 };
 
index b37e606126adb85e3f392e759e6405ecf9b3b356..0dbe0fd31ca08e0c648c0da3d5d8a0cafc80ff70 100644 (file)
@@ -213,7 +213,7 @@ namespace cds { namespace intrusive {
         {
             assert( pPred->m_pNext.load(memory_model::memory_order_relaxed).ptr() == pCur );
 
-            pNode->m_pNext.store( marked_node_ptr(pCur), memory_model::memory_order_release );
+            pNode->m_pNext.store( marked_node_ptr(pCur), memory_model::memory_order_relaxed );
             pPred->m_pNext.store( marked_node_ptr(pNode), memory_model::memory_order_release );
         }
 
@@ -224,7 +224,7 @@ namespace cds { namespace intrusive {
 
             node_type * pNext = pCur->m_pNext.load(memory_model::memory_order_relaxed).ptr();
             pCur->m_pNext.store( marked_node_ptr( pHead, 1 ), memory_model::memory_order_relaxed ); // logical deletion + back-link for search
-            pPred->m_pNext.store( marked_node_ptr( pNext ), memory_model::memory_order_relaxed); // physically deleting
+            pPred->m_pNext.store( marked_node_ptr( pNext ), memory_model::memory_order_release); // physically deleting
         }
 
         //@endcond
@@ -1035,7 +1035,7 @@ namespace cds { namespace intrusive {
         }
 
         template <typename Q, typename Compare, typename Func>
-        bool erase_at( node_type * pHead, Q const& val, Compare cmp, Func f, position& pos )
+        bool erase_at( node_type * const pHead, Q const& val, Compare cmp, Func f, position& pos )
         {
             check_deadlock_policy::check();
 
@@ -1086,7 +1086,7 @@ namespace cds { namespace intrusive {
         }
 
         template <typename Q, typename Compare>
-        value_type * extract_at( node_type * pHead, Q const& val, Compare cmp )
+        value_type * extract_at( node_type * const pHead, Q const& val, Compare cmp )
         {
             position pos;
             assert( gc::is_locked() ) ; // RCU must be locked!!!
@@ -1170,13 +1170,13 @@ namespace cds { namespace intrusive {
     protected:
         //@cond
         template <typename Q>
-        void search( node_type * pHead, Q const& key, position& pos ) const
+        void search( node_type * const pHead, Q const& key, position& pos ) const
         {
             search( pHead, key, pos, key_comparator() );
         }
 
         template <typename Q, typename Compare>
-        void search( node_type * pHead, Q const& key, position& pos, Compare cmp ) const
+        void search( node_type * const pHead, Q const& key, position& pos, Compare cmp ) const
         {
             // RCU should be locked!!!
             assert( gc::is_locked() );
@@ -1186,7 +1186,7 @@ namespace cds { namespace intrusive {
             marked_node_ptr pCur(pHead);
             marked_node_ptr pPrev(pHead);
 
-            while ( pCur.ptr() != pTail && ( pCur.ptr() == pHead || cmp( *node_traits::to_value_ptr( *pCur.ptr() ), key ) < 0 )) {
+            while ( pCur != pTail && ( pCur == pHead || cmp( *node_traits::to_value_ptr( *pCur.ptr()), key ) < 0 )) {
                 pPrev = pCur;
                 pCur = pCur->m_pNext.load(memory_model::memory_order_acquire);
             }
@@ -1195,7 +1195,7 @@ namespace cds { namespace intrusive {
             pos.pPred = pPrev.ptr();
         }
 
-        static bool validate( node_type * pPred, node_type * pCur )
+        static bool validate( node_type * pPred, node_type * pCur ) CDS_NOEXCEPT
         {
             // RCU lock should be locked!!!
             assert( gc::is_locked() );
index ffbfff3ac88f1a5d8f2962a92e3e7ad67cbcf3f9..6d4061a9202f6ea70bbe3a385dfbc81ca5e6f9da 100644 (file)
@@ -32,7 +32,7 @@ namespace cds { namespace intrusive {
         - \p Traits - set traits, default isd \p split_list::traits.
             Instead of defining \p Traits struct you may use option-based syntax with \p split_list::make_traits metafunction.
 
-        @note About reqired features of hash functor see \ref cds_SplitList_hash_functor "SplitList general description".
+        @note About required features of hash functor see \ref cds_SplitList_hash_functor "SplitList general description".
 
         \par How to use
         Before including <tt><cds/intrusive/split_list_rcu.h></tt> you should include appropriate RCU header file,
@@ -243,7 +243,7 @@ namespace cds { namespace intrusive {
         atomics::atomic<size_t> m_nMaxItemCount;    ///< number of items container can hold, before we have to resize
         item_counter            m_ItemCounter;      ///< Item counter
         hash                    m_HashFunctor;      ///< Hash functor
-        stat                    m_Stat;             ///< Internal stattistics accumulator
+        stat                    m_Stat;             ///< Internal statistics accumulator
 
     protected:
         //@cond
index b45f955ab576bbae7ce3a15cd9146e0925b41b92..d292bc7020da20e78e37bc6e71b6d4f5fb5f6008 100644 (file)
@@ -17,7 +17,7 @@ namespace cds { namespace memory {
 
         Template arguments:
         - \p T - value type
-        - \p Accessor - a functor to access to pool object. The pool has the following interface:
+        - \p Accessor - a functor to access to the pool object. The pool has the following interface:
             \code
             template <typename T>
             class pool {
@@ -29,7 +29,7 @@ namespace cds { namespace memory {
 
         <b>Usage</b>
 
-            Suppose, we have got a pool with interface above. Usually, the pool is a static object:
+            Suppose, we have a pool with interface above. Usually, the pool is a static object:
             \code
                 static pool<Foo>     thePool;
             \endcode
index bd723864581de8cf13d616c0c282e38b4bfe583c..cf324d663e84e03a919a3e50f9e538968897311a 100644 (file)
@@ -193,12 +193,12 @@ namespace cds { namespace memory {
     };
 
 
-    /// Lazy free-list based on bounded lock-free queue cds::intrusive::VyukovMPMCCycleQueue
+    /// Lazy free-list based on bounded lock-free queue \p cds::intrusive::VyukovMPMCCycleQueue
     /** @ingroup cds_memory_pool
         Template parameters:
         - \p T - the type of object maintaining by free-list
-        - \p Traits - traits for cds::intrusive::VyukovMPMCCycleQueue class plus
-            cds::opt::allocator option, defaul is \p vyukov_queue_pool_traits
+        - \p Traits - traits for \p cds::intrusive::VyukovMPMCCycleQueue class plus
+            \p cds::opt::allocator option, defaul is \p vyukov_queue_pool_traits
 
         \b Internals
 
@@ -305,7 +305,7 @@ namespace cds { namespace memory {
             return cxx_allocator().New();
         }
 
-        /// Deallocated the object \p p
+        /// Deallocates the object \p p
         /**
             The pool supports allocation only single object (\p n = 1).
             If \p n > 1 the behaviour is undefined.
@@ -327,12 +327,12 @@ namespace cds { namespace memory {
 
     };
 
-    /// Bounded free-list based on bounded lock-free queue cds::intrusive::VyukovMPMCCycleQueue
+    /// Bounded free-list based on bounded lock-free queue \p cds::intrusive::VyukovMPMCCycleQueue
     /** @ingroup cds_memory_pool
         Template parameters:
         - \p T - the type of object maintaining by free-list
-        - \p Traits - traits for cds::intrusive::VyukovMPMCCycleQueue class plus
-            cds::opt::allocator option, defaul is \p vyukov_queue_pool_traits
+        - \p Traits - traits for \p cds::intrusive::VyukovMPMCCycleQueue class plus
+            \p cds::opt::allocator option, defaul is \p vyukov_queue_pool_traits
 
         \b Internals
 
@@ -488,12 +488,12 @@ namespace cds { namespace memory {
             return p;
         }
 
-        /// Deallocated the object \p p
+        /// Deallocates the object \p p
         /**
             The pool supports allocation only single object (\p n = 1).
             If \p n > 1 the behaviour is undefined.
 
-            \p should be from preallocated pool.
+            \p should be from preallocated pool.
         */
         void deallocate( value_type * p, size_t n )
         {