diff options
Diffstat (limited to 'compiler-rt/lib')
-rw-r--r-- | compiler-rt/lib/tsan/lit_tests/java_lock.cc | 2 | ||||
-rw-r--r-- | compiler-rt/lib/tsan/rtl/tsan_mutexset.h | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/compiler-rt/lib/tsan/lit_tests/java_lock.cc b/compiler-rt/lib/tsan/lit_tests/java_lock.cc index f66f1e7097f..d9db103504d 100644 --- a/compiler-rt/lib/tsan/lit_tests/java_lock.cc +++ b/compiler-rt/lib/tsan/lit_tests/java_lock.cc @@ -1,10 +1,12 @@ // RUN: %clangxx_tsan -O1 %s -o %t && %t 2>&1 | FileCheck %s #include "java.h" +#include <unistd.h> jptr varaddr; jptr lockaddr; void *Thread(void *p) { + sleep(1); __tsan_java_mutex_lock(lockaddr); *(int*)varaddr = 42; __tsan_java_mutex_unlock(lockaddr); diff --git a/compiler-rt/lib/tsan/rtl/tsan_mutexset.h b/compiler-rt/lib/tsan/rtl/tsan_mutexset.h index 09223ff6cc4..eebfd4d70a1 100644 --- a/compiler-rt/lib/tsan/rtl/tsan_mutexset.h +++ b/compiler-rt/lib/tsan/rtl/tsan_mutexset.h @@ -22,7 +22,7 @@ class MutexSet { public: // Holds limited number of mutexes. // The oldest mutexes are discarded on overflow. - static const uptr kMaxSize = 64; + static const uptr kMaxSize = 16; struct Desc { u64 id; u64 epoch; |