diff options
author | Dmitry Vyukov <dvyukov@google.com> | 2012-12-06 12:16:15 +0000 |
---|---|---|
committer | Dmitry Vyukov <dvyukov@google.com> | 2012-12-06 12:16:15 +0000 |
commit | fd5ebcd1b0a7e73c3aabb4c872bdbc5d2a196a5e (patch) | |
tree | f1a80c6fc97c625fb4dc85e5955303ad4e86c238 /compiler-rt/lib/tsan/rtl/tsan_defs.h | |
parent | dbe7d7e96515775489b145b866d0278345e958d8 (diff) | |
download | bcm5719-llvm-fd5ebcd1b0a7e73c3aabb4c872bdbc5d2a196a5e.tar.gz bcm5719-llvm-fd5ebcd1b0a7e73c3aabb4c872bdbc5d2a196a5e.zip |
tsan: add mutexsets to reports
With this change reports say what mutexes the threads hold around the racy memory accesses.
llvm-svn: 169493
Diffstat (limited to 'compiler-rt/lib/tsan/rtl/tsan_defs.h')
-rw-r--r-- | compiler-rt/lib/tsan/rtl/tsan_defs.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler-rt/lib/tsan/rtl/tsan_defs.h b/compiler-rt/lib/tsan/rtl/tsan_defs.h index 3a530041d60..e0c04733f0a 100644 --- a/compiler-rt/lib/tsan/rtl/tsan_defs.h +++ b/compiler-rt/lib/tsan/rtl/tsan_defs.h @@ -139,6 +139,12 @@ T RoundDown(T p, u64 align) { return (T)((u64)p & ~(align - 1)); } +// Zeroizes high part, returns 'bits' lsb bits. +template<typename T> +T GetLsb(T v, int bits) { + return (T)((u64)v & ((1ull << bits) - 1)); +} + struct MD5Hash { u64 hash[2]; bool operator==(const MD5Hash &other) const; |