CDS_TSAN_ANNOTATE_IGNORE_WRITES_END;\
CDS_TSAN_ANNOTATE_IGNORE_READS_END
# define CDS_TSAN_ANNOTATE_NEW_MEMORY( addr, sz ) AnnotateNewMemory( __FILE__, __LINE__, reinterpret_cast<void *>(addr), sz )
+# define CDS_TSAN_ANNOTATE_PUBLISH_MEMORY_RANGE( addr, sz ) AnnotatePublishMemoryRange( __FILE__, __LINE__, reinterpret_cast<void *>(addr), sz )
# define CDS_TSAN_ANNOTATE_MUTEX_CREATE( addr ) AnnotateRWLockCreate( __FILE__, __LINE__, reinterpret_cast<void *>(addr))
# define CDS_TSAN_ANNOTATE_MUTEX_DESTROY( addr ) AnnotateRWLockDestroy( __FILE__, __LINE__, reinterpret_cast<void *>(addr))
void AnnotateIgnoreWritesBegin(const char *f, int l);
void AnnotateIgnoreWritesEnd(const char *f, int l);
- void AnnotateNewMemory( const char *f, int l, void * mem, size_t size);
+ void AnnotatePublishMemoryRange( const char *f, int l, void * mem, size_t size )
+ void AnnotateNewMemory( const char *f, int l, void * mem, size_t size );
void AnnotateRWLockCreate( const char *f, int l, void* m );
void AnnotateRWLockDestroy( const char *f, int l, void* m );
# define CDS_TSAN_ANNOTATE_IGNORE_RW_BEGIN
# define CDS_TSAN_ANNOTATE_IGNORE_RW_END
+# define CDS_TSAN_ANNOTATE_PUBLISH_MEMORY_RANGE( addr, sz )
# define CDS_TSAN_ANNOTATE_NEW_MEMORY( addr, sz )
# define CDS_TSAN_ANNOTATE_MUTEX_CREATE( addr )
// No records available for reuse
// Allocate and push a new record
pRec = allocator_type().New( curThreadId );
- CDS_COMPILER_RW_BARRIER;
thread_record * pOldHead = m_pHead.load( atomics::memory_order_acquire );
do {
+ // Compiler barriers: assignment MUST BE inside the loop
+ CDS_COMPILER_RW_BARRIER;
pRec->m_list.m_pNext = pOldHead;
- // Compiler barrier: assignment above MUST BE inside the loop
CDS_COMPILER_RW_BARRIER;
} while ( !m_pHead.compare_exchange_weak( pOldHead, pRec, atomics::memory_order_acq_rel, atomics::memory_order_acquire ));
// No HP records available for reuse
// Allocate and push a new HP record
hprec = NewHPRec( curThreadId );
- CDS_COMPILER_RW_BARRIER;
hplist_node * pOldHead = m_pListHead.load( atomics::memory_order_acquire );
do {
+ // Compiler barriers: assignment MUST BE inside the loop
+ CDS_COMPILER_RW_BARRIER;
hprec->m_pNextNode = pOldHead;
- // Compiler barrier: assignment above MUST BE inside the loop
CDS_COMPILER_RW_BARRIER;
} while ( !m_pListHead.compare_exchange_weak( pOldHead, hprec, atomics::memory_order_acq_rel, atomics::memory_order_acquire ));