summaryrefslogtreecommitdiff
path: root/lib/tsan
diff options
context:
space:
mode:
authorKuba Mracek <mracek@apple.com>2017-01-26 19:20:30 +0000
committerKuba Mracek <mracek@apple.com>2017-01-26 19:20:30 +0000
commit85a6508b1dedce6bf4ff8ed1900291f7336c9f4e (patch)
tree246c12ef8419928f0813e4a010573766a4fc3fa4 /lib/tsan
parent07eeff5582edc11a4acbc516b18778f016c04723 (diff)
[tsan] Fix os_id of main thread
Currently, os_id of the main thread contains the PID instead of a thread ID. Let's fix this. Differential Revision: https://reviews.llvm.org/D29106 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@293201 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/tsan')
-rw-r--r--lib/tsan/rtl/tsan_rtl.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/tsan/rtl/tsan_rtl.cc b/lib/tsan/rtl/tsan_rtl.cc
index bfb835889..e743a65a5 100644
--- a/lib/tsan/rtl/tsan_rtl.cc
+++ b/lib/tsan/rtl/tsan_rtl.cc
@@ -381,7 +381,7 @@ void Initialize(ThreadState *thr) {
// Initialize thread 0.
int tid = ThreadCreate(thr, 0, 0, true);
CHECK_EQ(tid, 0);
- ThreadStart(thr, tid, internal_getpid());
+ ThreadStart(thr, tid, GetTid());
#if TSAN_CONTAINS_UBSAN
__ubsan::InitAsPlugin();
#endif