diff options
author | Kuba Mracek <mracek@apple.com> | 2017-04-17 18:17:38 +0000 |
---|---|---|
committer | Kuba Mracek <mracek@apple.com> | 2017-04-17 18:17:38 +0000 |
commit | 0f9f15db742f9abe6141df0819cd0fd577c06a3d (patch) | |
tree | 3720c792c577c29d1369fec7c88842dd6a57f563 /test/tsan/Darwin | |
parent | 9e60082e3f68e8619ffc917bbdaaf0636c3fcaa3 (diff) | |
download | compiler-rt-0f9f15db742f9abe6141df0819cd0fd577c06a3d.tar.gz |
[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 'test/tsan/Darwin')
-rw-r--r-- | test/tsan/Darwin/main_tid.mm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/tsan/Darwin/main_tid.mm b/test/tsan/Darwin/main_tid.mm index af658e4b9..6dea58e53 100644 --- a/test/tsan/Darwin/main_tid.mm +++ b/test/tsan/Darwin/main_tid.mm @@ -8,7 +8,7 @@ extern "C" { void __tsan_on_report(void *report); int __tsan_get_report_thread(void *report, unsigned long idx, int *tid, - unsigned long *os_id, int *running, + uint64_t *os_id, int *running, const char **name, int *parent_tid, void **trace, unsigned long trace_size); } @@ -17,7 +17,7 @@ void __tsan_on_report(void *report) { fprintf(stderr, "__tsan_on_report(%p)\n", report); int tid; - unsigned long os_id; + uint64_t os_id; int running; const char *name; int parent_tid; |