summaryrefslogtreecommitdiffstats
path: root/base/atomic_ref_count.h
diff options
context:
space:
mode:
authorglider <glider@chromium.org>2014-09-23 14:50:16 -0700
committerCommit bot <commit-bot@chromium.org>2014-09-23 21:50:27 +0000
commit3a065495f1e4edd6e8d9b510340a927a917a91e6 (patch)
treefd7d597a058481375ef904a393728563558bfd21 /base/atomic_ref_count.h
parentf37219757faac607fb53aa4afc925ac1324c0cb2 (diff)
downloadchromium_src-3a065495f1e4edd6e8d9b510340a927a917a91e6.zip
chromium_src-3a065495f1e4edd6e8d9b510340a927a917a91e6.tar.gz
chromium_src-3a065495f1e4edd6e8d9b510340a927a917a91e6.tar.bz2
Remove TSan annotations from base/
, because ThreadSanitizer v2 doesn't need base::subtle to be annotated. We can't drop the dependency on libdynamic_annotations yet, because some code calls RunningOnValgrind(). Also remove the unused dynamic_annotations.h headers from base/ and add one to content/test/, which uses RunningOnValgrind(). BUG=349861 R=ajwong@chromium.org,phajdan.jr@chromium.org Review URL: https://codereview.chromium.org/580813002 Cr-Commit-Position: refs/heads/master@{#296265}
Diffstat (limited to 'base/atomic_ref_count.h')
-rw-r--r--base/atomic_ref_count.h11
1 files changed, 0 insertions, 11 deletions
diff --git a/base/atomic_ref_count.h b/base/atomic_ref_count.h
index 5130860..553fab6 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;
}