From: khizmax Date: Thu, 30 Apr 2015 18:23:12 +0000 (+0300) Subject: TSan exam: fixed intrusive stack test X-Git-Tag: v2.1.0~245^2~6 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=a1f8922b113e40010f37ef7643332423410d7511;p=libcds.git TSan exam: fixed intrusive stack test --- diff --git a/tests/unit/stack/stack_intrusive_pushpop.cpp b/tests/unit/stack/stack_intrusive_pushpop.cpp index 4369bf1c..2ed56cd9 100644 --- a/tests/unit/stack/stack_intrusive_pushpop.cpp +++ b/tests/unit/stack/stack_intrusive_pushpop.cpp @@ -149,12 +149,14 @@ namespace istack { while ( !(getTest().m_nWorkingProducers.load(atomics::memory_order_acquire) == 0 && m_Stack.empty()) ) { typename Stack::value_type * p = m_Stack.pop(); if ( p ) { + CDS_TSAN_ANNOTATE_IGNORE_WRITES_BEGIN; p->nConsumer = m_nThreadNo; ++m_nPopCount; if ( p->nNo < sizeof(m_arrPop)/sizeof(m_arrPop[0]) ) ++m_arrPop[p->nNo]; else ++m_nDirtyPop; + CDS_TSAN_ANNOTATE_IGNORE_WRITES_END; } else ++m_nPopEmpty;