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
This commit is contained in:
parent
d028b6209c
commit
e0f25dda3f
@ -41,13 +41,6 @@
|
|||||||
#include "private/ErrnoRestorer.h"
|
#include "private/ErrnoRestorer.h"
|
||||||
#include "private/ScopedPthreadMutexLocker.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.
|
// x86 uses segment descriptors rather than a direct pointer to TLS.
|
||||||
#if __i386__
|
#if __i386__
|
||||||
#include <asm/ldt.h>
|
#include <asm/ldt.h>
|
||||||
@ -56,8 +49,6 @@ extern "C" __LIBC_HIDDEN__ void __init_user_desc(struct user_desc*, int, void*);
|
|||||||
|
|
||||||
static pthread_mutex_t g_pthread_stack_creation_lock = PTHREAD_MUTEX_INITIALIZER;
|
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;
|
extern "C" int __isthreaded;
|
||||||
|
|
||||||
// This code is used both by each new pthread and the code that initializes the main thread.
|
// This code is used both by each new pthread and the code that initializes the main thread.
|
||||||
@ -258,12 +249,6 @@ int pthread_create(pthread_t* thread_out, pthread_attr_t const* attr,
|
|||||||
return init_errno;
|
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.
|
// Publish the pthread_t and unlock the mutex to let the new thread start running.
|
||||||
*thread_out = reinterpret_cast<pthread_t>(thread);
|
*thread_out = reinterpret_cast<pthread_t>(thread);
|
||||||
pthread_mutex_unlock(&thread->startup_handshake_mutex);
|
pthread_mutex_unlock(&thread->startup_handshake_mutex);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user