diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-01-21 15:11:02 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-01-21 15:11:02 +0000 |
commit | 91506eb0b9461a19c6fc7dc0b15edbdbd1ed094d (patch) | |
tree | bbe2e7ed2c61438c34500a77a7ad4838c75736bb /include | |
parent | 5e93b858844328f8118591507a16f8686624b70e (diff) |
Scope our ANNOTATE_BENIGN_RACE.
This should unstick the DEPS roll. When building with TSAN, Chromium's pulling
in the canonical one from dynamic_annotations.h, and we're trying to redefine it.
R=robertphillips@google.com, reed@google.com, bsalomon@google.com
TBR=reed@google.com
BUG=
Author: mtklein@google.com
Review URL: https://codereview.chromium.org/144063002
git-svn-id: http://skia.googlecode.com/svn/trunk@13129 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include')
-rw-r--r-- | include/core/SkOnce.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/core/SkOnce.h b/include/core/SkOnce.h index 78fd7007b0..9c4ccd49d0 100644 --- a/include/core/SkOnce.h +++ b/include/core/SkOnce.h @@ -112,7 +112,7 @@ static void sk_once_slow(SkOnceFlag* once, Func f, Arg arg) { // We nabbed this code from the dynamic_annotations library, and in their honor // we check the same define. If you find yourself wanting more than just -// ANNOTATE_BENIGN_RACE, it might make sense to pull that in as a dependency +// SK_ANNOTATE_BENIGN_RACE, it might make sense to pull that in as a dependency // rather than continue to reproduce it here. #if DYNAMIC_ANNOTATIONS_ENABLED @@ -120,15 +120,15 @@ static void sk_once_slow(SkOnceFlag* once, Func f, Arg arg) { extern "C" { void AnnotateBenignRace(const char* file, int line, const volatile void* mem, const char* desc); } -#define ANNOTATE_BENIGN_RACE(mem, desc) AnnotateBenignRace(__FILE__, __LINE__, mem, desc) +#define SK_ANNOTATE_BENIGN_RACE(mem, desc) AnnotateBenignRace(__FILE__, __LINE__, mem, desc) #else -#define ANNOTATE_BENIGN_RACE(mem, desc) +#define SK_ANNOTATE_BENIGN_RACE(mem, desc) #endif // This is our fast path, called all the time. We do really want it to be inlined. template <typename Func, typename Arg> inline void SkOnce(SkOnceFlag* once, Func f, Arg arg) { - ANNOTATE_BENIGN_RACE(&(once->done), "Don't worry TSAN, we're sure this is safe."); + SK_ANNOTATE_BENIGN_RACE(&(once->done), "Don't worry TSAN, we're sure this is safe."); if (!once->done) { sk_once_slow(once, f, arg); } @@ -145,6 +145,6 @@ inline void SkOnce(SkOnceFlag* once, Func f, Arg arg) { acquire_barrier(); } -#undef ANNOTATE_BENIGN_RACE +#undef SK_ANNOTATE_BENIGN_RACE #endif // SkOnce_DEFINED |