Merge pull request #27 from krinkinmu/fastpath-opt
[libcds.git] / cds / intrusive / details / michael_list_base.h
index 89f5719839cfc8141d589256d348d69351956275..bcafce1ee6a7dc919677f39e63380cbc8826637b 100644 (file)
@@ -1,12 +1,12 @@
 //$$CDS-header$$
 
-#ifndef __CDS_INTRUSIVE_DETAILS_MICHAEL_LIST_BASE_H
-#define __CDS_INTRUSIVE_DETAILS_MICHAEL_LIST_BASE_H
+#ifndef CDSLIB_INTRUSIVE_DETAILS_MICHAEL_LIST_BASE_H
+#define CDSLIB_INTRUSIVE_DETAILS_MICHAEL_LIST_BASE_H
 
 #include <type_traits>
 #include <cds/intrusive/details/base.h>
 #include <cds/opt/compare.h>
-#include <cds/cxx11_atomic.h>
+#include <cds/algo/atomic.h>
 #include <cds/details/marked_ptr.h>
 #include <cds/urcu/options.h>
 
@@ -19,8 +19,8 @@ namespace cds { namespace intrusive {
         /// Michael's list node
         /**
             Template parameters:
-            - GC - garbage collector
-            - Tag - a tag used to distinguish between different implementation
+            - \p GC - garbage collector
+            - \p Tag - a \ref cds_intrusive_hook_tag "tag"
         */
         template <class GC, typename Tag = opt::none>
         struct node
@@ -73,7 +73,7 @@ namespace cds { namespace intrusive {
         /**
             \p Options are:
             - opt::gc - garbage collector used.
-            - opt::tag - tag
+            - opt::tag - a \ref cds_intrusive_hook_tag "tag"
         */
         template < typename... Options >
         struct base_hook: public hook< opt::base_hook_tag, Options... >
@@ -86,7 +86,7 @@ namespace cds { namespace intrusive {
 
             \p Options are:
             - opt::gc - garbage collector used.
-            - opt::tag - tag
+            - opt::tag - a \ref cds_intrusive_hook_tag "tag"
         */
         template < size_t MemberOffset, typename... Options >
         struct member_hook: public hook< opt::member_hook_tag, Options... >
@@ -103,7 +103,7 @@ namespace cds { namespace intrusive {
 
             \p Options are:
             - opt::gc - garbage collector used.
-            - opt::tag - tag
+            - opt::tag - a \ref cds_intrusive_hook_tag "tag"
         */
         template <typename NodeTraits, typename... Options >
         struct traits_hook: public hook< opt::traits_hook_tag, Options... >
@@ -128,6 +128,7 @@ namespace cds { namespace intrusive {
             static void is_empty( const node_type * pNode )
             {
                 assert( pNode->m_pNext.load( atomics::memory_order_relaxed ) == nullptr );
+                CDS_UNUSED( pNode );
             }
         };
 
@@ -204,7 +205,7 @@ namespace cds { namespace intrusive {
             static const opt::link_check_type link_checker = opt::debug_check_link;
 
             /// C++ memory ordering model
-            /** 
+            /**
                 Can be \p opt::v::relaxed_ordering (relaxed memory model, the default)
                 or \p opt::v::sequential_consistent (sequentially consisnent memory model).
             */
@@ -262,4 +263,4 @@ namespace cds { namespace intrusive {
 
 }}   // namespace cds::intrusive
 
-#endif // #ifndef __CDS_INTRUSIVE_DETAILS_MICHAEL_LIST_BASE_H
+#endif // #ifndef CDSLIB_INTRUSIVE_DETAILS_MICHAEL_LIST_BASE_H