for ( typename Queue::value_type * p = m_pStart; p < m_pEnd; ) {
p->nNo = i;
p->nWriterNo = m_nThreadNo;
+ CDS_TSAN_ANNOTATE_HAPPENS_BEFORE( &p->nWriterNo );
if ( m_Queue.push( *p )) {
++p;
++i;
if ( p ) {
p->nConsumer = m_nThreadNo;
++m_nPopped;
+ CDS_TSAN_ANNOTATE_HAPPENS_AFTER( &p->nWriterNo );
if ( p->nWriterNo < nTotalWriters )
m_WriterData[ p->nWriterNo ].push_back( p->nNo );
else
protected:
template <class Queue>
- void analyze( CppUnitMini::ThreadPool& pool, Queue& testQueue, size_t nLeftOffset, size_t nRightOffset )
+ void analyze( CppUnitMini::ThreadPool& pool, Queue& testQueue, size_t /*nLeftOffset*/, size_t nRightOffset )
{
typedef Consumer<Queue> Reader;
typedef Producer<Queue> Writer;
{
value_array<typename Queue::value_type> arrValue( s_nQueueSize );
{
- Queue q;
- test_with(q, arrValue, 0, 0);
+ {
+ Queue q;
+ test_with( q, arrValue, 0, 0 );
+ }
+ Queue::gc::force_dispose();
}
- Queue::gc::force_dispose();
}
template <typename Queue>