diff options
Diffstat (limited to 'compiler-rt/lib/lsan/lsan_thread.cpp')
-rw-r--r-- | compiler-rt/lib/lsan/lsan_thread.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/compiler-rt/lib/lsan/lsan_thread.cpp b/compiler-rt/lib/lsan/lsan_thread.cpp index 371a1f29dfe0..1d224ebca693 100644 --- a/compiler-rt/lib/lsan/lsan_thread.cpp +++ b/compiler-rt/lib/lsan/lsan_thread.cpp @@ -30,13 +30,10 @@ static ThreadContextBase *CreateThreadContext(u32 tid) { return new (mem) ThreadContext(tid); } -static const uptr kMaxThreads = 1 << 13; -static const uptr kThreadQuarantineSize = 64; - void InitializeThreadRegistry() { static ALIGNED(64) char thread_registry_placeholder[sizeof(ThreadRegistry)]; - thread_registry = new (thread_registry_placeholder) - ThreadRegistry(CreateThreadContext, kMaxThreads, kThreadQuarantineSize); + thread_registry = + new (thread_registry_placeholder) ThreadRegistry(CreateThreadContext); } ThreadContextLsanBase::ThreadContextLsanBase(int tid) @@ -94,7 +91,7 @@ void ThreadJoin(u32 tid) { } void EnsureMainThreadIDIsCorrect() { - if (GetCurrentThread() == 0) + if (GetCurrentThread() == kMainTid) CurrentThreadContext()->os_id = GetTid(); } |