Move _thread_created_hook to where it belongs.
Change-Id: I643d761c78ccaae25270aeffa2afb811c4e2fcd7
This commit is contained in:
parent
d971f72905
commit
af8aebebb5
@ -43,14 +43,13 @@
|
|||||||
extern "C" pid_t __bionic_clone(uint32_t flags, void* child_stack, int* parent_tid, void* tls, int* child_tid, int (*fn)(void*), void* arg);
|
extern "C" pid_t __bionic_clone(uint32_t flags, void* child_stack, int* parent_tid, void* tls, int* child_tid, int (*fn)(void*), void* arg);
|
||||||
extern "C" int __set_tls(void*);
|
extern "C" int __set_tls(void*);
|
||||||
|
|
||||||
|
// Used by gdb to track thread creation. See libthread_db.
|
||||||
#ifdef __i386__
|
#ifdef __i386__
|
||||||
#define ATTRIBUTES __attribute__((noinline)) __attribute__((fastcall))
|
extern "C" __attribute__((noinline)) __attribute__((fastcall)) void _thread_created_hook(pid_t) {}
|
||||||
#else
|
#else
|
||||||
#define ATTRIBUTES __attribute__((noinline))
|
extern "C" __attribute__((noinline)) void _thread_created_hook(pid_t) {}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern "C" void ATTRIBUTES _thread_created_hook(pid_t thread_id);
|
|
||||||
|
|
||||||
static pthread_mutex_t gPthreadStackCreationLock = PTHREAD_MUTEX_INITIALIZER;
|
static pthread_mutex_t gPthreadStackCreationLock = PTHREAD_MUTEX_INITIALIZER;
|
||||||
|
|
||||||
static pthread_mutex_t gDebuggerNotificationLock = PTHREAD_MUTEX_INITIALIZER;
|
static pthread_mutex_t gDebuggerNotificationLock = PTHREAD_MUTEX_INITIALIZER;
|
||||||
|
@ -51,17 +51,3 @@ long ptrace(int request, pid_t pid, void* addr, void* data) {
|
|||||||
return __ptrace(request, pid, addr, data);
|
return __ptrace(request, pid, addr, data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Hook for gdb to get notified when a thread is created
|
|
||||||
*/
|
|
||||||
#ifdef __i386__
|
|
||||||
#define ATTRIBUTES __attribute__((noinline)) __attribute__((fastcall))
|
|
||||||
#else
|
|
||||||
#define ATTRIBUTES __attribute__((noinline))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern "C" void _thread_created_hook(pid_t) ATTRIBUTES;
|
|
||||||
|
|
||||||
void _thread_created_hook(pid_t) {
|
|
||||||
}
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user