#ifndef __CDS_INTRUSIVE_MICHAEL_LIST_NOGC_H
#define __CDS_INTRUSIVE_MICHAEL_LIST_NOGC_H
-#include <cds/intrusive/michael_list_base.h>
+#include <cds/intrusive/details/michael_list_base.h>
#include <cds/gc/nogc.h>
namespace cds { namespace intrusive {
typedef gc::nogc gc ; ///< Garbage collector
typedef Tag tag ; ///< tag
- typedef CDS_ATOMIC::atomic< node * > atomic_ptr ; ///< atomic marked pointer
+ typedef atomics::atomic< node * > atomic_ptr ; ///< atomic marked pointer
atomic_ptr m_pNext ; ///< pointer to the next node in the container
//@cond
// Rebind options (split-list support)
- template <CDS_DECL_OPTIONS7>
+ template <typename... Options>
struct rebind_options {
typedef MichaelList<
gc
, value_type
- , typename cds::opt::make_options< options, CDS_OPTIONS7>::type
+ , typename cds::opt::make_options< options, Options...>::type
> type;
};
//@endcond
void dispose_node( node_type * pNode, Disposer disp )
{
clear_links( pNode );
- cds::unref(disp)( node_traits::to_value_ptr( *pNode ));
+ disp( node_traits::to_value_ptr( *pNode ));
}
template <class Disposer>
link_checker::is_empty( pNode );
pNode->m_pNext.store( pos.pCur, memory_model::memory_order_relaxed );
- return pos.pPrev->compare_exchange_strong( pos.pCur, pNode, memory_model::memory_order_release, CDS_ATOMIC::memory_order_relaxed );
+ return pos.pPrev->compare_exchange_strong( pos.pCur, pNode, memory_model::memory_order_release, atomics::memory_order_relaxed );
}
//@endcond
The functor may 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 <tt>boost::ref</tt> or cds::ref.
+ You can pass \p func argument by value or by reference using \p std::ref.
Returns <tt> std::pair<bool, bool> </tt> where \p first is true if operation is successfull,
\p second is true if new item has been added or \p false if the item with \p key
\endcode
where \p item is the item found, \p val is the <tt>find</tt> function argument.
- You can pass \p f argument by value or by reference using <tt>boost::ref</tt> 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.
The function \p find does not serialize simultaneous access to the list \p item. If such access is
\endcode
where \p item is the item found, \p val is the <tt>find</tt> function argument.
- You can pass \p f argument by value or by reference using <tt>boost::ref</tt> 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.
The function \p find does not serialize simultaneous access to the list \p item. If such access is
if ( search( refHead, val, key_comparator(), pos ) ) {
assert( key_comparator()( val, *node_traits::to_value_ptr( *pos.pCur ) ) == 0 );
- unref(func)( false, *node_traits::to_value_ptr( *pos.pCur ) , val );
+ func( false, *node_traits::to_value_ptr( *pos.pCur ) , val );
return std::make_pair( iterator( pos.pCur ), false );
}
else {
if ( link_node( node_traits::to_node_ptr( val ), pos ) ) {
++m_ItemCounter;
- unref(func)( true, val , val );
+ func( true, val , val );
return std::make_pair( iterator( node_traits::to_node_ptr( val )), true );
}
}
if ( search( refHead, val, cmp, pos ) ) {
assert( pos.pCur != nullptr );
- unref(f)( *node_traits::to_value_ptr( *pos.pCur ), val );
+ f( *node_traits::to_value_ptr( *pos.pCur ), val );
return true;
}
return false;