Refactors queue push pop
[libcds.git] / cds / intrusive / fcstack.h
index 57d1fbd607608d8c05650c3a49ebd669193abf47..257079b03a758935b36ae96bcb93d0651769cab1 100644 (file)
@@ -259,7 +259,6 @@ namespace cds { namespace intrusive {
             return m_FlatCombining.statistics();
         }
 
-
     public: // flat combining cooperation, not for direct use!
         //@cond
         /// Flat combining supporting function. Do not call it directly!
@@ -272,8 +271,6 @@ namespace cds { namespace intrusive {
         {
             assert( pRec );
 
-            // this function is called under FC mutex, so switch TSan off
-            CDS_TSAN_ANNOTATE_IGNORE_RW_BEGIN;
             switch ( pRec->op()) {
             case op_push:
                 assert( pRec->pVal );
@@ -296,18 +293,14 @@ namespace cds { namespace intrusive {
                 assert(false);
                 break;
             }
-            CDS_TSAN_ANNOTATE_IGNORE_RW_END;
         }
 
         /// Batch-processing flat combining
         void fc_process( typename fc_kernel::iterator itBegin, typename fc_kernel::iterator itEnd )
         {
-            // this function is called under FC mutex, so switch TSan off
-            CDS_TSAN_ANNOTATE_IGNORE_RW_BEGIN;
-
             typedef typename fc_kernel::iterator fc_iterator;
             for ( fc_iterator it = itBegin, itPrev = itEnd; it != itEnd; ++it ) {
-                switch ( it->op()) {
+                switch ( it->op( atomics::memory_order_acquire )) {
                 case op_push:
                 case op_pop:
                     if ( itPrev != itEnd && collide( *itPrev, *it ))
@@ -317,7 +310,6 @@ namespace cds { namespace intrusive {
                     break;
                 }
             }
-            CDS_TSAN_ANNOTATE_IGNORE_RW_END;
         }
         //@endcond