summaryrefslogtreecommitdiff
path: root/lib/asan/asan_mac.cc
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2013-03-21 11:23:41 +0000
committerAlexey Samsonov <samsonov@google.com>2013-03-21 11:23:41 +0000
commitdef1be9b7ef4091ce465c0fbfb26cdb52128ade8 (patch)
treeec6af26f13d371b58d1ecd9d552f111233972403 /lib/asan/asan_mac.cc
parenta38e40fde45acccb124f7419ecbe21ef6cfd306b (diff)
downloadcompiler-rt-def1be9b7ef4091ce465c0fbfb26cdb52128ade8.tar.gz
compiler-rt-def1be9b7ef4091ce465c0fbfb26cdb52128ade8.tar.bz2
compiler-rt-def1be9b7ef4091ce465c0fbfb26cdb52128ade8.tar.xz
[ASan] Switch ASan to generic ThreadRegistry from sanitizer_common. Delete ASan-specific AsanThreadRegistry.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177634 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/asan/asan_mac.cc')
-rw-r--r--lib/asan/asan_mac.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/asan/asan_mac.cc b/lib/asan/asan_mac.cc
index e88aa6a7..eb1ca93e 100644
--- a/lib/asan/asan_mac.cc
+++ b/lib/asan/asan_mac.cc
@@ -21,7 +21,6 @@
#include "asan_mapping.h"
#include "asan_stack.h"
#include "asan_thread.h"
-#include "asan_thread_registry.h"
#include "sanitizer_common/sanitizer_libc.h"
#include <crt_externs.h> // for _NSGetArgv
@@ -293,9 +292,11 @@ static ALWAYS_INLINE
void asan_register_worker_thread(int parent_tid, StackTrace *stack) {
AsanThread *t = GetCurrentThread();
if (!t) {
- t = AsanThread::Create(parent_tid, 0, 0, stack);
- asanThreadRegistry().RegisterThread(t);
+ t = AsanThread::Create(0, 0);
+ CreateThreadContextArgs args = { t, stack };
+ asanThreadRegistry().CreateThread(*(uptr*)t, true, parent_tid, &args);
t->Init();
+ asanThreadRegistry().StartThread(t->tid(), 0, 0);
SetCurrentThread(t);
}
}