From fd5ebcd1b0a7e73c3aabb4c872bdbc5d2a196a5e Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Thu, 6 Dec 2012 12:16:15 +0000 Subject: tsan: add mutexsets to reports With this change reports say what mutexes the threads hold around the racy memory accesses. llvm-svn: 169493 --- compiler-rt/lib/tsan/rtl/tsan_defs.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'compiler-rt/lib/tsan/rtl/tsan_defs.h') 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 +T GetLsb(T v, int bits) { + return (T)((u64)v & ((1ull << bits) - 1)); +} + struct MD5Hash { u64 hash[2]; bool operator==(const MD5Hash &other) const; -- cgit v1.2.3