diff options
author | Khem Raj <kraj@mvista.com> | 2008-12-15 19:07:27 +0000 |
---|---|---|
committer | Khem Raj <kraj@mvista.com> | 2008-12-15 19:07:27 +0000 |
commit | 049ddd1e98e7c26664f8b66cd5e1239bda3c19cc (patch) | |
tree | 7bbd17fd8953579f5916d280de338aa1c0b3a277 /libpthread/linuxthreads | |
parent | 3dc0cc7b9459f83600357e6156749086ef268988 (diff) | |
download | uClibc-alpine-049ddd1e98e7c26664f8b66cd5e1239bda3c19cc.tar.bz2 uClibc-alpine-049ddd1e98e7c26664f8b66cd5e1239bda3c19cc.tar.xz |
Merge Linuxthreads from Trunk.
Diffstat (limited to 'libpthread/linuxthreads')
3 files changed, 17 insertions, 49 deletions
diff --git a/libpthread/linuxthreads/sysdeps/pthread/sigaction.c b/libpthread/linuxthreads/sysdeps/pthread/sigaction.c index 0a0a9e29f..2f2a85caf 100644 --- a/libpthread/linuxthreads/sysdeps/pthread/sigaction.c +++ b/libpthread/linuxthreads/sysdeps/pthread/sigaction.c @@ -17,6 +17,8 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +/* Somebody please explain what's going on here. --vda */ + /* This is tricky. GCC doesn't like #include_next in the primary source file and even if it did, the first #include_next is this exact file anyway. */ diff --git a/libpthread/linuxthreads/sysdeps/unix/sysv/linux/execve.c b/libpthread/linuxthreads/sysdeps/unix/sysv/linux/execve.c index 9fa912b90..b6a6a018d 100644 --- a/libpthread/linuxthreads/sysdeps/unix/sysv/linux/execve.c +++ b/libpthread/linuxthreads/sysdeps/unix/sysv/linux/execve.c @@ -22,52 +22,19 @@ #include <sysdep.h> #include <alloca.h> #include <sys/syscall.h> -#include <bp-checks.h> - -extern int __syscall_execve (const char *__unbounded file, - char *__unbounded const *__unbounded argv, - char *__unbounded const *__unbounded envp); -extern void __pthread_kill_other_threads_np (void); -weak_extern (__pthread_kill_other_threads_np) +extern int __syscall_execve(const char *file, + char *const *argv, + char *const *envp); +extern void __pthread_kill_other_threads_np(void); +weak_extern(__pthread_kill_other_threads_np) int -__execve (file, argv, envp) - const char *file; - char *const argv[]; - char *const envp[]; +__execve(const char *file, char *const argv[], char *const envp[]) { - /* If this is a threaded application kill all other threads. */ - if (__pthread_kill_other_threads_np) - __pthread_kill_other_threads_np (); -#if __BOUNDED_POINTERS__ - { - char *const *v; - int i; - char *__unbounded *__unbounded ubp_argv; - char *__unbounded *__unbounded ubp_envp; - char *__unbounded *__unbounded ubp_v; - - for (v = argv; *v; v++) - ; - i = v - argv + 1; - ubp_argv = (char *__unbounded *__unbounded) alloca (sizeof (*ubp_argv) * i); - for (v = argv, ubp_v = ubp_argv; --i; v++, ubp_v++) - *ubp_v = CHECK_STRING (*v); - *ubp_v = 0; - - for (v = envp; *v; v++) - ; - i = v - envp + 1; - ubp_envp = (char *__unbounded *__unbounded) alloca (sizeof (*ubp_envp) * i); - for (v = envp, ubp_v = ubp_envp; --i; v++, ubp_v++) - *ubp_v = CHECK_STRING (*v); - *ubp_v = 0; - - return INLINE_SYSCALL (execve, 3, CHECK_STRING (file), ubp_argv, ubp_envp); - } -#else - return INLINE_SYSCALL (execve, 3, file, argv, envp); -#endif + /* If this is a threaded application kill all other threads. */ + if (__pthread_kill_other_threads_np) + __pthread_kill_other_threads_np(); + return INLINE_SYSCALL(execve, 3, file, argv, envp); } -weak_alias (__execve, execve) +weak_alias(__execve, execve) diff --git a/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sigwait.c b/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sigwait.c index 3432125bb..9bacb1360 100644 --- a/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sigwait.c +++ b/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sigwait.c @@ -23,11 +23,10 @@ #include <sysdep-cancel.h> #include <sys/syscall.h> -#include <bp-checks.h> #include <bits/libc-lock.h> -extern int __syscall_rt_sigtimedwait (const sigset_t *__unbounded, siginfo_t *__unbounded, - const struct timespec *__unbounded, size_t); +extern int __syscall_rt_sigtimedwait (const sigset_t *, siginfo_t *, + const struct timespec *, size_t); /* Return any pending signal or wait for one for the given time. */ @@ -40,7 +39,7 @@ do_sigwait (const sigset_t *set, int *sig) real size of the user-level sigset_t. */ #ifdef INTERNAL_SYSCALL INTERNAL_SYSCALL_DECL (err); - ret = INTERNAL_SYSCALL (rt_sigtimedwait, err, 4, CHECK_SIGSET (set), + ret = INTERNAL_SYSCALL (rt_sigtimedwait, err, 4, set, NULL, NULL, _NSIG / 8); if (! INTERNAL_SYSCALL_ERROR_P (ret, err)) { @@ -50,7 +49,7 @@ do_sigwait (const sigset_t *set, int *sig) else ret = INTERNAL_SYSCALL_ERRNO (ret, err); #else - ret = INLINE_SYSCALL (rt_sigtimedwait, 4, CHECK_SIGSET (set), + ret = INLINE_SYSCALL (rt_sigtimedwait, 4, set, NULL, NULL, _NSIG / 8); if (ret != -1) { |