diff options
Diffstat (limited to 'libc/sysdeps/linux/common')
| -rw-r--r-- | libc/sysdeps/linux/common/_exit.c | 10 | ||||
| -rw-r--r-- | libc/sysdeps/linux/common/bits/sigcontext.h | 3 |
2 files changed, 13 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/common/_exit.c b/libc/sysdeps/linux/common/_exit.c index 518a6d2e8..a0b891d25 100644 --- a/libc/sysdeps/linux/common/_exit.c +++ b/libc/sysdeps/linux/common/_exit.c @@ -12,6 +12,9 @@ #include <unistd.h> #include <sys/types.h> #include <sys/syscall.h> +#ifdef __UCLIBC_HAS_THREADS__ +#include <sysdep.h> +#endif /* libc_hidden_proto(_exit) */ @@ -25,6 +28,13 @@ void attribute_noreturn _exit(int status) { /* The loop is added only to keep gcc happy. */ while(1) + { +#ifdef __UCLIBC_HAS_THREADS_NATIVE__ +# ifdef __NR_exit_group + INLINE_SYSCALL(exit_group, 1, status); +# endif +#endif INLINE_SYSCALL(exit, 1, status); + } } libc_hidden_def(_exit) diff --git a/libc/sysdeps/linux/common/bits/sigcontext.h b/libc/sysdeps/linux/common/bits/sigcontext.h index 67dcf9498..35bf5bc89 100644 --- a/libc/sysdeps/linux/common/bits/sigcontext.h +++ b/libc/sysdeps/linux/common/bits/sigcontext.h @@ -25,5 +25,8 @@ we need sigcontext. */ # define sigcontext_struct sigcontext +# ifndef __user +# define __user +# endif # include <asm/sigcontext.h> #endif |
