about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/s390/s390-64
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-12-15 17:45:55 +0000
committerUlrich Drepper <drepper@redhat.com>2004-12-15 17:45:55 +0000
commitf23673fc71f75f509f4b4c0080fb975a939a462f (patch)
treef116cd9e9ad3983bd115d98dd91533048a520992 /sysdeps/unix/sysv/linux/s390/s390-64
parentf05a41ebd3865694bfec31b385f661d23272296f (diff)
downloadglibc-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/unix/sysv/linux/s390/s390-64')
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-64/clone.S15
1 files changed, 15 insertions, 0 deletions
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 */