[LSAN][NFC] Removed FinishThreadLocked from the LSAN interface.
authorKirill Stoimenov <kstoimenov@google.com>
Fri, 6 Jan 2023 00:08:59 +0000 (00:08 +0000)
committerKirill Stoimenov <kstoimenov@google.com>
Fri, 6 Jan 2023 00:28:40 +0000 (00:28 +0000)
It is only used in the LSAN specific part.

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D140109

compiler-rt/lib/lsan/lsan_common.h
compiler-rt/lib/lsan/lsan_fuchsia.cpp
compiler-rt/lib/lsan/lsan_thread.cpp

index 7827370..089aa10 100644 (file)
@@ -108,7 +108,6 @@ void ForEachExtraStackRange(tid_t os_id, RangeIteratorCallback callback,
 
 void RunCallbackForEachThreadLocked(__sanitizer::ThreadRegistry::ThreadCallback cb,
                                     void *arg);
-void FinishThreadLocked(u32 tid);
 
 //// --------------------------------------------------------------------------
 //// Allocator prototypes.
index 1cb0fc6..1bcb748 100644 (file)
@@ -110,7 +110,7 @@ void __sanitizer_thread_create_hook(void *hook, thrd_t thread, int error) {
   // On success, there is nothing to do here.
   if (error != thrd_success) {
     // Clean up the thread registry for the thread creation that didn't happen.
-    FinishThreadLocked(tid);
+    GetLsanThreadRegistryLocked()->FinishThread(tid);
   }
 }
 
index 7309b83..d04d905 100644 (file)
@@ -92,8 +92,4 @@ void RunCallbackForEachThreadLocked(
   GetLsanThreadRegistryLocked()->RunCallbackForEachThreadLocked(cb, arg);
 }
 
-void FinishThreadLocked(u32 tid) {
-  GetLsanThreadRegistryLocked()->FinishThread(tid);
-}
-
 }  // namespace __lsan