summaryrefslogtreecommitdiff
path: root/lib/tsan/rtl/tsan_rtl.h
diff options
context:
space:
mode:
authorKuba Mracek <mracek@apple.com>2017-04-17 18:17:38 +0000
committerKuba Mracek <mracek@apple.com>2017-04-17 18:17:38 +0000
commit0f9f15db742f9abe6141df0819cd0fd577c06a3d (patch)
tree3720c792c577c29d1369fec7c88842dd6a57f563 /lib/tsan/rtl/tsan_rtl.h
parent9e60082e3f68e8619ffc917bbdaaf0636c3fcaa3 (diff)
[sanitizer] Introduce tid_t as a typedef for OS-provided thread IDs
We seem to assume that OS-provided thread IDs are either uptr or int, neither of which is true on Darwin. This introduces a tid_t type, which holds a OS-provided thread ID (gettid on Linux, pthread_threadid_np on Darwin, pthread_self on FreeBSD). Differential Revision: https://reviews.llvm.org/D31774 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@300473 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/tsan/rtl/tsan_rtl.h')
-rw-r--r--lib/tsan/rtl/tsan_rtl.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/tsan/rtl/tsan_rtl.h b/lib/tsan/rtl/tsan_rtl.h
index 0d62af00a..3481c31eb 100644
--- a/lib/tsan/rtl/tsan_rtl.h
+++ b/lib/tsan/rtl/tsan_rtl.h
@@ -720,7 +720,7 @@ void FuncEntry(ThreadState *thr, uptr pc);
void FuncExit(ThreadState *thr);
int ThreadCreate(ThreadState *thr, uptr pc, uptr uid, bool detached);
-void ThreadStart(ThreadState *thr, int tid, uptr os_id, bool workerthread);
+void ThreadStart(ThreadState *thr, int tid, tid_t os_id, bool workerthread);
void ThreadFinish(ThreadState *thr);
int ThreadTid(ThreadState *thr, uptr pc, uptr uid);
void ThreadJoin(ThreadState *thr, uptr pc, int tid);