[compiler-rt] r209658 - [tsan] Fix tsango build.
Evgeniy Stepanov
eugeni.stepanov at gmail.com
Tue May 27 07:18:43 PDT 2014
Author: eugenis
Date: Tue May 27 09:18:43 2014
New Revision: 209658
URL: http://llvm.org/viewvc/llvm-project?rev=209658&view=rev
Log:
[tsan] Fix tsango build.
Modified:
compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.cc
Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.cc?rev=209658&r1=209657&r2=209658&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.cc (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.cc Tue May 27 09:18:43 2014
@@ -203,11 +203,13 @@ static void StartBackgroundThread() {
ctx->background_thread = internal_start_thread(&BackgroundThread, 0);
}
+#ifndef TSAN_GO
static void StopBackgroundThread() {
atomic_store(&ctx->stop_background_thread, 1, memory_order_relaxed);
internal_join_thread(ctx->background_thread);
ctx->background_thread = 0;
}
+#endif
void DontNeedShadowFor(uptr addr, uptr size) {
uptr shadow_beg = MemToShadow(addr);
@@ -268,7 +270,9 @@ void Initialize(ThreadState *thr) {
Symbolizer::Get()->AddHooks(EnterSymbolizer, ExitSymbolizer);
#endif
StartBackgroundThread();
+#ifndef TSAN_GO
SetSandboxingCallback(StopBackgroundThread);
+#endif
if (flags()->detect_deadlocks)
ctx->dd = DDetector::Create(flags());
More information about the llvm-commits
mailing list