projects
/
libcds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9dcd608
)
Added TSan annotations
author
khizmax
<libcds.dev@gmail.com>
Fri, 12 Jun 2015 21:01:42 +0000
(
00:01
+0300)
committer
khizmax
<libcds.dev@gmail.com>
Fri, 12 Jun 2015 21:01:42 +0000
(
00:01
+0300)
cds/memory/michael/allocator.h
patch
|
blob
|
history
diff --git
a/cds/memory/michael/allocator.h
b/cds/memory/michael/allocator.h
index 0366e55ac2b3b1514c8d8312df99e22874b0e237..0271139504076b99a6f9d7b2e55414780b5d40c0 100644
(file)
--- 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;
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<free_block_header *>( pAddr )->nNextFree;
newAnchor.avail = reinterpret_cast<free_block_header *>( pAddr )->nNextFree;
+ CDS_TSAN_ANNOTATE_IGNORE_WRITES_END;
newAnchor.tag += 1;
if ( oldActive.credits() == 0 ) {
newAnchor.tag += 1;
if ( oldActive.credits() == 0 ) {
@@
-1686,6
+1690,7
@@
namespace michael {
);
}
);
}
+ CDS_TSAN_ANNOTATE_NEW_MEMORY( pBlock + 1, nSize );
return pBlock + 1;
}
return pBlock + 1;
}