diff options
author | Ulrich Drepper <drepper@redhat.com> | 2004-12-15 17:45:55 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2004-12-15 17:45:55 +0000 |
commit | f23673fc71f75f509f4b4c0080fb975a939a462f (patch) | |
tree | f116cd9e9ad3983bd115d98dd91533048a520992 /sysdeps | |
parent | f05a41ebd3865694bfec31b385f661d23272296f (diff) | |
download | glibc-f23673fc71f75f509f4b4c0080fb975a939a462f.tar.gz glibc-f23673fc71f75f509f4b4c0080fb975a939a462f.tar.xz glibc-f23673fc71f75f509f4b4c0080fb975a939a462f.zip |
Update.
2004-12-15 Jakub Jelinek <jakub@redhat.com> * nis/nis_domain_of_r.c (nis_domain_of_r): Use libnsl_hidden_def, not libnsl_hidden_proto. * sysdeps/unix/sysv/linux/s390/s390-32/clone.S (__clone): Add support for NPTL where the PID is stored at userlevel and needs to be reset when CLONE_THREAD is not used. * sysdeps/unix/sysv/linux/s390/s390-64/clone.S (__clone): Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S (__clone): Save and restore r2 around call to fn.
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S | 2 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/s390/s390-32/clone.S | 13 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/s390/s390-64/clone.S | 15 |
3 files changed, 30 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S index 61a35a2f79..f6ce115077 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S @@ -104,12 +104,14 @@ L(nomoregetpid): L(oldpid): #endif + std r2,40(r1) /* Call procedure. */ ld r0,0(r29) ld r2,8(r29) mtctr r0 mr r3,r31 bctrl + ld r2,40(r1) /* Call _exit with result from procedure. */ #ifdef SHARED b JUMPTARGET(__GI__exit) diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/clone.S b/sysdeps/unix/sysv/linux/s390/s390-32/clone.S index 442045bf21..70f695a952 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/clone.S +++ b/sysdeps/unix/sysv/linux/s390/s390-32/clone.S @@ -21,6 +21,7 @@ and invokes a function in the right context after its all over. */ #include <sysdep.h> +#include <tls.h> #define _ERRNO_H 1 #include <bits/errno.h> @@ -54,6 +55,18 @@ error: PSEUDO_END (__clone) thread_start: +#ifdef RESET_PID + tmh %r3,1 /* CLONE_THREAD == 0x00010000 */ + jne 1f + lhi %r2,-1 + tml %r3,256 /* CLONE_VM == 0x00000100 */ + jne 2f + svc SYS_ify(getpid) +2: ear %r3,%a0 + st %r2,PID(%r3) + st %r2,TID(%r3) +1: +#endif /* fn is in gpr 1, arg in gpr 0 */ lr %r2,%r0 /* set first parameter to void *arg */ ahi %r15,-96 /* make room on the stack for the save area */ diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/clone.S b/sysdeps/unix/sysv/linux/s390/s390-64/clone.S index 724ca611ec..cdc6716a1f 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-64/clone.S +++ b/sysdeps/unix/sysv/linux/s390/s390-64/clone.S @@ -22,6 +22,7 @@ and invokes a function in the right context after its all over. */ #include <sysdep.h> +#include <tls.h> #define _ERRNO_H 1 #include <bits/errno.h> @@ -55,6 +56,20 @@ error: PSEUDO_END (__clone) thread_start: +#ifdef RESET_PID + tmh %r3,1 /* CLONE_THREAD == 0x00010000 */ + jne 1f + lhi %r2,-1 + tml %r3,256 /* CLONE_VM == 0x00000100 */ + jne 2f + svc SYS_ify(getpid) +2: ear %r3,%a0 + sllg %r3,%r3,32 + ear %r3,%a1 + st %r2,PID(%r3) + st %r2,TID(%r3) +1: +#endif /* fn is in gpr 1, arg in gpr 0 */ lgr %r2,%r0 /* set first parameter to void *arg */ aghi %r15,-160 /* make room on the stack for the save area */ |