From a1f8922b113e40010f37ef7643332423410d7511 Mon Sep 17 00:00:00 2001 From: khizmax Date: Thu, 30 Apr 2015 21:23:12 +0300 Subject: [PATCH] TSan exam: fixed intrusive stack test --- tests/unit/stack/stack_intrusive_pushpop.cpp | 2 ++ 1 file changed, 2 insertions(+) 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; -- 2.34.1