Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1524)

Unified Diff: base/atomic_ref_count.h

Issue 580813002: Remove TSan annotations from base/, because ThreadSanitizer v2 doesn't need base::subtle to be anno… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: IWYU for RunningOnValgrind() Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/lazy_instance.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/atomic_ref_count.h
diff --git a/base/atomic_ref_count.h b/base/atomic_ref_count.h
index 5130860ab0c28554a29b38cd25739af49f30738c..553fab6a8c65b65a3436edd2c80dfb68653bd172 100644
--- a/base/atomic_ref_count.h
+++ b/base/atomic_ref_count.h
@@ -12,7 +12,6 @@
#define BASE_ATOMIC_REF_COUNT_H_
#include "base/atomicops.h"
-#include "base/third_party/dynamic_annotations/dynamic_annotations.h"
namespace base {
@@ -30,11 +29,7 @@ inline void AtomicRefCountIncN(volatile AtomicRefCount *ptr,
// became zero will be visible to a thread that has just made the count zero.
inline bool AtomicRefCountDecN(volatile AtomicRefCount *ptr,
AtomicRefCount decrement) {
- ANNOTATE_HAPPENS_BEFORE(ptr);
bool res = (subtle::Barrier_AtomicIncrement(ptr, -decrement) != 0);
- if (!res) {
- ANNOTATE_HAPPENS_AFTER(ptr);
- }
return res;
}
@@ -58,9 +53,6 @@ inline bool AtomicRefCountDec(volatile AtomicRefCount *ptr) {
// exclusive access to the object.
inline bool AtomicRefCountIsOne(volatile AtomicRefCount *ptr) {
bool res = (subtle::Acquire_Load(ptr) == 1);
- if (res) {
- ANNOTATE_HAPPENS_AFTER(ptr);
- }
return res;
}
@@ -69,9 +61,6 @@ inline bool AtomicRefCountIsOne(volatile AtomicRefCount *ptr) {
// should never be zero. Hence this is generally used for a debug check.
inline bool AtomicRefCountIsZero(volatile AtomicRefCount *ptr) {
bool res = (subtle::Acquire_Load(ptr) == 0);
- if (res) {
- ANNOTATE_HAPPENS_AFTER(ptr);
- }
return res;
}
« no previous file with comments | « no previous file | base/lazy_instance.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698