diff options
Diffstat (limited to 'libc')
-rw-r--r-- | libc/bionic/pthread.c | 8 | ||||
-rw-r--r-- | libc/bionic/ptrace.c | 9 |
2 files changed, 14 insertions, 3 deletions
diff --git a/libc/bionic/pthread.c b/libc/bionic/pthread.c index b28cd9f65..180914e2f 100644 --- a/libc/bionic/pthread.c +++ b/libc/bionic/pthread.c @@ -68,7 +68,13 @@ int __futex_wait_ex(volatile void *ftx, int pshared, int val, const struct time #define __likely(cond) __builtin_expect(!!(cond), 1) #define __unlikely(cond) __builtin_expect(!!(cond), 0) -void _thread_created_hook(pid_t thread_id) __attribute__((noinline)); +#ifdef __i386__ +#define ATTRIBUTES __attribute__((noinline)) __attribute__((fastcall)) +#else +#define ATTRIBUTES __attribute__((noinline)) +#endif + +void ATTRIBUTES _thread_created_hook(pid_t thread_id); #define PTHREAD_ATTR_FLAG_DETACHED 0x00000001 #define PTHREAD_ATTR_FLAG_USER_STACK 0x00000002 diff --git a/libc/bionic/ptrace.c b/libc/bionic/ptrace.c index 863fac73f..0bb1acd78 100644 --- a/libc/bionic/ptrace.c +++ b/libc/bionic/ptrace.c @@ -57,7 +57,12 @@ long ptrace(int request, pid_t pid, void * addr, void * data) /* * Hook for gdb to get notified when a thread is created */ -void _thread_created_hook(pid_t thread_id) __attribute__((noinline)); -void _thread_created_hook(pid_t thread_id) +#ifdef __i386__ +#define ATTRIBUTES __attribute__((noinline)) __attribute__((fastcall)) +#else +#define ATTRIBUTES __attribute__((noinline)) +#endif + +void ATTRIBUTES _thread_created_hook(pid_t thread_id) { } |