aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2014-06-02 13:23:49 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-06-02 13:23:49 -0700
commitbe7de4fc4229b70b0954f3ea5e3b053dae4c1a9d (patch)
treeed79e35bed27d88478cb4dcd750dff0761bdf6ad /src
parentc77392ed58ec78ab19fa0e3ff99fb8110854fba2 (diff)
Update TSAN suppressions.
TSAN suppressions need to be on their own line, even free of comments. Also, temporarily add SK_ANNOTATE_UNPROTECTED_READ to sk_acquire_load. Will remove this when we're done iterating on SkBarriers_tsan.h: TSAN has an atomic load that makes the annotation moot. BUG=skia: R=bungeman@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/308073013
Diffstat (limited to 'src')
-rw-r--r--src/ports/SkBarriers_x86.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ports/SkBarriers_x86.h b/src/ports/SkBarriers_x86.h
index fc57615e04..4fbc444049 100644
--- a/src/ports/SkBarriers_x86.h
+++ b/src/ports/SkBarriers_x86.h
@@ -8,6 +8,8 @@
#ifndef SkBarriers_x86_DEFINED
#define SkBarriers_x86_DEFINED
+#include "SkDynamicAnnotations.h"
+
#ifdef SK_BUILD_FOR_WIN
# include <intrin.h>
static inline void sk_compiler_barrier() { _ReadWriteBarrier(); }
@@ -17,7 +19,7 @@ static inline void sk_compiler_barrier() { asm volatile("" : : : "memory"); }
template <typename T>
T sk_acquire_load(T* ptr) {
- T val = *ptr;
+ T val = SK_ANNOTATE_UNPROTECTED_READ(*ptr);
// On x86, all loads are acquire loads, so we only need a compiler barrier.
sk_compiler_barrier();
return val;