Merged branch 'master' of https://github.com/Nemo1369/libcds
[libcds.git] / test / stress / freelist / put_get.cpp
index 8a2c2b0351150b19b87cc96cfe1bc3067f53fc90..368162c85d53eb7c7a821f734e5203def7877c36 100644 (file)
@@ -1,7 +1,7 @@
 /*
     This file is a part of libcds - Concurrent Data Structures library
 
-    (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016
+    (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2017
 
     Source code repo: http://github.com/khizmax/libcds/
     Download: http://sourceforge.net/projects/libcds/files/
@@ -50,7 +50,7 @@ namespace {
             size_t  counter;
 
             value_type()
-                : counter(0) 
+                : counter(0)
             {}
         };
 
@@ -88,7 +88,9 @@ namespace {
                     item_type* p;
 
                     while ( (p = static_cast<item_type*>( m_FreeList.get())) != nullptr ) {
+                        CDS_TSAN_ANNOTATE_IGNORE_RW_BEGIN;
                         p->counter++;
+                        CDS_TSAN_ANNOTATE_IGNORE_RW_END;
                         arr[n] = p;
                         ++m_nSuccess;
                         ++n;
@@ -175,7 +177,7 @@ namespace {
         };
 
         atomics::atomic<tagged_ptr> tp;
-        if ( tp.is_lock_free() ) {
+        if ( tp.is_lock_free()) {
             cds::intrusive::TaggedFreeList fl;
             test( fl );
         }