X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=cds%2Fintrusive%2Fskip_list_rcu.h;h=d1c17cfa5d8810e2b649ffa08f8bf7d515deba93;hb=92c1bbab088df29ed018aa6bd73a18277109e04e;hp=9d74a9741feb434da30f47ad6fcf1a5bab3c9e24;hpb=7dac077c1f71d753e833caf9a8db36e3ad5793e7;p=libcds.git diff --git a/cds/intrusive/skip_list_rcu.h b/cds/intrusive/skip_list_rcu.h index 9d74a974..d1c17cfa 100644 --- a/cds/intrusive/skip_list_rcu.h +++ b/cds/intrusive/skip_list_rcu.h @@ -5,9 +5,9 @@ #include #include -#include +#include // ref +#include #include -#include #include #include #include @@ -543,7 +543,7 @@ namespace cds { namespace intrusive { typedef typename options::stat stat ; ///< internal statistics type typedef typename options::rcu_check_deadlock rcu_check_deadlock ; ///< Deadlock checking policy typedef typename gc::scoped_lock rcu_lock ; ///< RCU scoped lock - static CDS_CONSTEXPR_CONST bool c_bExtractLockExternal = false; ///< Group of \p extract_xxx functions does not require external locking + static CDS_CONSTEXPR const bool c_bExtractLockExternal = false; ///< Group of \p extract_xxx functions does not require external locking /// Max node height. The actual node height should be in range [0 .. c_nMaxHeight) @@ -879,7 +879,7 @@ retry: # ifdef _DEBUG pNode->m_bLinked = true; # endif - cds::unref( f )( val ); + f( val ); } for ( unsigned int nLevel = 1; nLevel < nHeight; ++nLevel ) { @@ -945,7 +945,7 @@ retry: int const nMask = bExtract ? 3 : 1; if ( pDel->next(0).compare_exchange_strong( pSucc, pSucc | nMask, memory_model::memory_order_acquire, atomics::memory_order_relaxed )) { - cds::unref(f)( *node_traits::to_value_ptr( pDel )); + f( *node_traits::to_value_ptr( pDel )); // physical deletion // try fast erase @@ -1031,7 +1031,7 @@ retry: } else if ( nCmp == 0 ) { // found - cds::unref(f)( *node_traits::to_value_ptr( pCur.ptr() ), val ); + f( *node_traits::to_value_ptr( pCur.ptr() ), val ); return find_fastpath_found; } else // pCur > val - go down @@ -1049,7 +1049,7 @@ retry: if ( find_position( val, pos, cmp, true )) { assert( cmp( *node_traits::to_value_ptr( pos.pCur ), val ) == 0 ); - cds::unref(f)( *node_traits::to_value_ptr( pos.pCur ), val ); + f( *node_traits::to_value_ptr( pos.pCur ), val ); return true; } else @@ -1470,7 +1470,7 @@ retry: where \p val is the item inserted. User-defined functor \p f should guarantee that during changing \p val no any other changes could be made on this set's item by concurrent threads. The user-defined functor is called only if the inserting is success and may be passed by reference - using boost::ref + using \p std::ref. RCU \p synchronize method can be called. RCU should not be locked. */ @@ -1551,7 +1551,7 @@ retry: The functor can change non-key fields of the \p item; however, \p func must guarantee that during changing no any other modifications could be made on this item by concurrent threads. - You can pass \p func argument by value or by reference using boost::ref or cds::ref. + You can pass \p func argument by value or by reference using \p std::ref. RCU \p synchronize method can be called. RCU should not be locked. @@ -1583,7 +1583,7 @@ retry: if ( !bTowerMade ) scp.release(); - cds::unref(func)( false, *node_traits::to_value_ptr(pos.pCur), val ); + func( false, *node_traits::to_value_ptr(pos.pCur), val ); m_Stat.onEnsureExist(); break; } @@ -1595,7 +1595,7 @@ retry: bTowerOk = true; } - if ( !insert_at_position( val, pNode, pos, [&func]( value_type& item ) { cds::unref(func)( true, item, item ); })) { + if ( !insert_at_position( val, pNode, pos, [&func]( value_type& item ) { func( true, item, item ); })) { m_Stat.onInsertRetry(); continue; } @@ -1869,7 +1869,7 @@ retry: \endcode where \p item is the item found, \p val is the find function argument. - You can pass \p f argument by value or by reference using boost::ref or cds::ref. + You can pass \p f argument by value or by reference using \p std::ref. The functor can change non-key fields of \p item. Note that the functor is only guarantee that \p item cannot be disposed during functor is executing. @@ -1913,7 +1913,7 @@ retry: \endcode where \p item is the item found, \p val is the find function argument. - You can pass \p f argument by value or by reference using boost::ref or cds::ref. + You can pass \p f argument by value or by reference using \p std::ref. The functor can change non-key fields of \p item. Note that the functor is only guarantee that \p item cannot be disposed during functor is executing.