Remove the obsolete _thread_created_hook.
gdb won't even try to use this on Android because it knows we don't
support old enough kernels to need it.
Bug: 15470251
Change-Id: Ia6d54585d888bbab8ee0490a148a1586b25437b9
diff --git a/libc/bionic/pthread_create.cpp b/libc/bionic/pthread_create.cpp
index 2ded22b..d1aeb93 100644
--- a/libc/bionic/pthread_create.cpp
+++ b/libc/bionic/pthread_create.cpp
@@ -41,13 +41,6 @@
#include "private/ErrnoRestorer.h"
#include "private/ScopedPthreadMutexLocker.h"
-// Used by gdb to track thread creation. See libthread_db.
-#ifdef __i386__
-extern "C" __attribute__((noinline)) __attribute__((fastcall)) void _thread_created_hook(pid_t) {}
-#else
-extern "C" __attribute__((noinline)) void _thread_created_hook(pid_t) {}
-#endif
-
// x86 uses segment descriptors rather than a direct pointer to TLS.
#if __i386__
#include <asm/ldt.h>
@@ -56,8 +49,6 @@
static pthread_mutex_t g_pthread_stack_creation_lock = PTHREAD_MUTEX_INITIALIZER;
-static pthread_mutex_t g_debugger_notification_lock = PTHREAD_MUTEX_INITIALIZER;
-
extern "C" int __isthreaded;
// This code is used both by each new pthread and the code that initializes the main thread.
@@ -258,12 +249,6 @@
return init_errno;
}
- // Notify any debuggers about the new thread.
- {
- ScopedPthreadMutexLocker debugger_locker(&g_debugger_notification_lock);
- _thread_created_hook(thread->tid);
- }
-
// Publish the pthread_t and unlock the mutex to let the new thread start running.
*thread_out = reinterpret_cast<pthread_t>(thread);
pthread_mutex_unlock(&thread->startup_handshake_mutex);