From: khizmax Date: Fri, 12 Jun 2015 21:01:42 +0000 (+0300) Subject: Added TSan annotations X-Git-Tag: v2.1.0~207 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=b3740b8ae0db8e4b1923f90711bb1e9a5eb92ef6;p=libcds.git Added TSan annotations --- diff --git a/cds/memory/michael/allocator.h b/cds/memory/michael/allocator.h index 0366e55a..02711395 100644 --- a/cds/memory/michael/allocator.h +++ b/cds/memory/michael/allocator.h @@ -1223,7 +1223,11 @@ namespace michael { assert( oldAnchor.avail < pDesc->nCapacity ); pAddr = pDesc->pSB + oldAnchor.avail * (unsigned long long) pDesc->nBlockSize; + + // TSan reports data race if the block contained atomic ops before + CDS_TSAN_ANNOTATE_IGNORE_WRITES_BEGIN; newAnchor.avail = reinterpret_cast( pAddr )->nNextFree; + CDS_TSAN_ANNOTATE_IGNORE_WRITES_END; newAnchor.tag += 1; if ( oldActive.credits() == 0 ) { @@ -1686,6 +1690,7 @@ namespace michael { ); } + CDS_TSAN_ANNOTATE_NEW_MEMORY( pBlock + 1, nSize ); return pBlock + 1; }