diff options
author | Roland McGrath <roland@hack.frob.com> | 2014-05-13 09:49:20 -0700 |
---|---|---|
committer | Roland McGrath <roland@hack.frob.com> | 2014-05-13 09:49:20 -0700 |
commit | e0db65176fa88b9497cbd6362b24e3225382bfb6 (patch) | |
tree | b692338590e818c8b273730577434d4d685fc4ef /nptl | |
parent | 01eb16fdb6c143884dcaeadf45ffdd725207eed5 (diff) | |
download | glibc-e0db65176fa88b9497cbd6362b24e3225382bfb6.zip glibc-e0db65176fa88b9497cbd6362b24e3225382bfb6.tar.gz glibc-e0db65176fa88b9497cbd6362b24e3225382bfb6.tar.bz2 |
Clean up __exit_thread.
Diffstat (limited to 'nptl')
-rw-r--r-- | nptl/pthread_create.c | 3 | ||||
-rw-r--r-- | nptl/sysdeps/i386/pthreaddef.h | 13 | ||||
-rw-r--r-- | nptl/sysdeps/powerpc/pthreaddef.h | 7 | ||||
-rw-r--r-- | nptl/sysdeps/s390/pthreaddef.h | 7 | ||||
-rw-r--r-- | nptl/sysdeps/sh/pthreaddef.h | 14 | ||||
-rw-r--r-- | nptl/sysdeps/sparc/sparc32/pthreaddef.h | 6 | ||||
-rw-r--r-- | nptl/sysdeps/sparc/sparc64/pthreaddef.h | 6 | ||||
-rw-r--r-- | nptl/sysdeps/x86_64/pthreaddef.h | 7 |
8 files changed, 2 insertions, 61 deletions
diff --git a/nptl/pthread_create.c b/nptl/pthread_create.c index 38e69cb..2997163 100644 --- a/nptl/pthread_create.c +++ b/nptl/pthread_create.c @@ -29,6 +29,7 @@ #include <libc-internal.h> #include <resolv.h> #include <kernel-features.h> +#include <exit-thread.h> #include <shlib-compat.h> @@ -432,7 +433,7 @@ start_thread (void *arg) The exit code is zero since in case all threads exit by calling 'pthread_exit' the exit status must be 0 (zero). */ - __exit_thread_inline (0); + __exit_thread (); /* NOTREACHED */ return 0; diff --git a/nptl/sysdeps/i386/pthreaddef.h b/nptl/sysdeps/i386/pthreaddef.h index 3a1ea1c..bf00c00 100644 --- a/nptl/sysdeps/i386/pthreaddef.h +++ b/nptl/sysdeps/i386/pthreaddef.h @@ -38,16 +38,3 @@ /* Location of current stack frame. */ #define CURRENT_STACK_FRAME __builtin_frame_address (0) - - -/* XXX Until we have a better place keep the definitions here. */ - -/* While there is no such syscall. */ -#define __exit_thread_inline(val) \ - while (1) { \ - if (__builtin_constant_p (val) && (val) == 0) \ - asm volatile ("xorl %%ebx, %%ebx; int $0x80" :: "a" (__NR_exit)); \ - else \ - asm volatile ("movl %1, %%ebx; int $0x80" \ - :: "a" (__NR_exit), "r" (val)); \ - } diff --git a/nptl/sysdeps/powerpc/pthreaddef.h b/nptl/sysdeps/powerpc/pthreaddef.h index a0db629..5c6a0cd 100644 --- a/nptl/sysdeps/powerpc/pthreaddef.h +++ b/nptl/sysdeps/powerpc/pthreaddef.h @@ -31,10 +31,3 @@ /* Location of current stack frame. */ #define CURRENT_STACK_FRAME __builtin_frame_address (0) - - -/* XXX Until we have a better place keep the definitions here. */ - -/* While there is no such syscall. */ -#define __exit_thread_inline(val) \ - INLINE_SYSCALL (exit, 1, (val)) diff --git a/nptl/sysdeps/s390/pthreaddef.h b/nptl/sysdeps/s390/pthreaddef.h index 70cb6a4..b2a7c05 100644 --- a/nptl/sysdeps/s390/pthreaddef.h +++ b/nptl/sysdeps/s390/pthreaddef.h @@ -31,10 +31,3 @@ /* Location of current stack frame. */ #define CURRENT_STACK_FRAME __builtin_frame_address (0) - - -/* XXX Until we have a better place keep the definitions here. */ - -/* While there is no such syscall. */ -#define __exit_thread_inline(val) \ - INLINE_SYSCALL (exit, 1, (val)) diff --git a/nptl/sysdeps/sh/pthreaddef.h b/nptl/sysdeps/sh/pthreaddef.h index f0b1ad7..7ea338e 100644 --- a/nptl/sysdeps/sh/pthreaddef.h +++ b/nptl/sysdeps/sh/pthreaddef.h @@ -32,17 +32,3 @@ /* Location of current stack frame. */ #define CURRENT_STACK_FRAME __builtin_frame_address (0) - - -/* XXX Until we have a better place keep the definitions here. */ - -/* While there is no such syscall. */ -#define __exit_thread_inline(val) \ - while (1) { \ - if (__builtin_constant_p (val) && (val) == 0) \ - asm volatile ("mov #0,r4; mov %0,r3; trapa #0x11\n\t" SYSCALL_INST_PAD \ - :: "i" (__NR_exit)); \ - else \ - asm volatile ("mov %1,r4; mov %0,r3; trapa #0x11\n\t" SYSCALL_INST_PAD \ - :: "i" (__NR_exit), "r" (val)); \ - } diff --git a/nptl/sysdeps/sparc/sparc32/pthreaddef.h b/nptl/sysdeps/sparc/sparc32/pthreaddef.h index 64d796b..eb8d33b 100644 --- a/nptl/sysdeps/sparc/sparc32/pthreaddef.h +++ b/nptl/sysdeps/sparc/sparc32/pthreaddef.h @@ -31,9 +31,3 @@ /* Location of current stack frame. */ #define CURRENT_STACK_FRAME (stack_pointer + (2 * 64)) register char *stack_pointer __asm__("%sp"); - -/* XXX Until we have a better place keep the definitions here. */ - -/* While there is no such syscall. */ -#define __exit_thread_inline(val) \ - INLINE_SYSCALL (exit, 1, (val)) diff --git a/nptl/sysdeps/sparc/sparc64/pthreaddef.h b/nptl/sysdeps/sparc/sparc64/pthreaddef.h index de39eef..ee44bcf 100644 --- a/nptl/sysdeps/sparc/sparc64/pthreaddef.h +++ b/nptl/sysdeps/sparc/sparc64/pthreaddef.h @@ -31,9 +31,3 @@ /* Location of current stack frame. */ #define CURRENT_STACK_FRAME (stack_pointer + (2 * 128)) register char *stack_pointer __asm__("%sp"); - -/* XXX Until we have a better place keep the definitions here. */ - -/* While there is no such syscall. */ -#define __exit_thread_inline(val) \ - INLINE_SYSCALL (exit, 1, (val)) diff --git a/nptl/sysdeps/x86_64/pthreaddef.h b/nptl/sysdeps/x86_64/pthreaddef.h index 18a15a1..485a625 100644 --- a/nptl/sysdeps/x86_64/pthreaddef.h +++ b/nptl/sysdeps/x86_64/pthreaddef.h @@ -42,10 +42,3 @@ /* Location of current stack frame. The frame pointer is not usable. */ #define CURRENT_STACK_FRAME \ ({ register char *frame __asm__("rsp"); frame; }) - - -/* XXX Until we have a better place keep the definitions here. */ - -/* While there is no such syscall. */ -#define __exit_thread_inline(val) \ - asm volatile ("syscall" :: "a" (__NR_exit), "D" (val)) |