diff options
author | Dmitry Vyukov <dvyukov@google.com> | 2014-03-04 11:39:56 +0000 |
---|---|---|
committer | Dmitry Vyukov <dvyukov@google.com> | 2014-03-04 11:39:56 +0000 |
commit | 123c2a5038b994cf2fcffac4302ce6d96a3d3ce6 (patch) | |
tree | c3c176928ec6b4ae3dc2582f35d759ed573f5c11 /lib/tsan/dd/dd_rtl.h | |
parent | cc91c67acb92458a64bfc06f5dbd8ac429636d6e (diff) |
tsan: add concurrent hashmap for standalone deadlock detector
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@202826 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/tsan/dd/dd_rtl.h')
-rw-r--r-- | lib/tsan/dd/dd_rtl.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/tsan/dd/dd_rtl.h b/lib/tsan/dd/dd_rtl.h index 016200900..4485dbdd7 100644 --- a/lib/tsan/dd/dd_rtl.h +++ b/lib/tsan/dd/dd_rtl.h @@ -12,13 +12,12 @@ #include "sanitizer_common/sanitizer_internal_defs.h" #include "sanitizer_common/sanitizer_deadlock_detector_interface.h" #include "sanitizer_common/sanitizer_allocator_internal.h" +#include "sanitizer_common/sanitizer_addrhashmap.h" #include "sanitizer_common/sanitizer_mutex.h" namespace __dsan { struct Mutex { - Mutex *link; - uptr addr; DDMutex dd; }; @@ -26,15 +25,15 @@ struct Thread { DDPhysicalThread *dd_pt; DDLogicalThread *dd_lt; - bool in_symbolizer; + bool ignore_interceptors; }; +typedef AddrHashMap<Mutex, 1000003> MutexHashMap; + struct Context { DDetector *dd; - SpinMutex mutex_mtx; - Mutex *mutex_list; - u64 mutex_seq; + MutexHashMap mutex_map; }; void InitializeInterceptors(); |