From: khizmax Date: Sat, 5 Dec 2015 15:14:03 +0000 (+0300) Subject: Doc fix X-Git-Tag: v2.1.0~45 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=a3d7046c93833f994231956d84f739b0661094e1;p=libcds.git Doc fix --- diff --git a/.gitignore b/.gitignore index d34994c1..6107723e 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,4 @@ /todo-2.1.txt *.log /.project +/projects/Win/vc14/*.opendb diff --git a/cds/intrusive/details/split_list_base.h b/cds/intrusive/details/split_list_base.h index e6d22cca..07557e04 100644 --- a/cds/intrusive/details/split_list_base.h +++ b/cds/intrusive/details/split_list_base.h @@ -707,12 +707,10 @@ namespace cds { namespace intrusive { void operator()( value_type * v ) { splitlist_node_type * p = static_cast( node_traits::to_node_ptr( v )); - if ( p->is_dummy() ) { + if ( p->is_dummy() ) dummy_node_disposer()( p ); - } - else { + else native_disposer()( v ); - } } }; diff --git a/cds/intrusive/lazy_list_rcu.h b/cds/intrusive/lazy_list_rcu.h index b37e6061..0dbe0fd3 100644 --- a/cds/intrusive/lazy_list_rcu.h +++ b/cds/intrusive/lazy_list_rcu.h @@ -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 - 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 - 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 - 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 - 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() ); diff --git a/cds/intrusive/split_list_rcu.h b/cds/intrusive/split_list_rcu.h index ffbfff3a..6d4061a9 100644 --- a/cds/intrusive/split_list_rcu.h +++ b/cds/intrusive/split_list_rcu.h @@ -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 you should include appropriate RCU header file, @@ -243,7 +243,7 @@ namespace cds { namespace intrusive { atomics::atomic 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 diff --git a/cds/memory/pool_allocator.h b/cds/memory/pool_allocator.h index b45f955a..d292bc70 100644 --- a/cds/memory/pool_allocator.h +++ b/cds/memory/pool_allocator.h @@ -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 class pool { @@ -29,7 +29,7 @@ namespace cds { namespace memory { Usage - 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 thePool; \endcode diff --git a/cds/memory/vyukov_queue_pool.h b/cds/memory/vyukov_queue_pool.h index bd723864..cf324d66 100644 --- a/cds/memory/vyukov_queue_pool.h +++ b/cds/memory/vyukov_queue_pool.h @@ -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 p should be from preallocated pool. */ void deallocate( value_type * p, size_t n ) {