Update.
authorUlrich Drepper <drepper@redhat.com>
Wed, 15 Dec 2004 17:45:55 +0000 (17:45 +0000)
committerUlrich Drepper <drepper@redhat.com>
Wed, 15 Dec 2004 17:45:55 +0000 (17:45 +0000)
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.

ChangeLog
nis/nis_domain_of_r.c
nptl/ChangeLog
nptl/sysdeps/s390/tcb-offsets.sym
nptl/sysdeps/unix/sysv/linux/s390/s390-32/clone.S [new file with mode: 0644]
nptl/sysdeps/unix/sysv/linux/s390/s390-64/clone.S [new file with mode: 0644]
sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S
sysdeps/unix/sysv/linux/s390/s390-32/clone.S
sysdeps/unix/sysv/linux/s390/s390-64/clone.S

index 76892d5..6bb9745 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+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.
+
 2004-12-15  Andreas Jaeger  <aj@suse.de>
 
        * sysdeps/ia64/dl-machine.h (elf_machine_rela): Mark auto instead
index ca298f3..1fedcfe 100644 (file)
@@ -54,4 +54,4 @@ nis_domain_of_r (const_nis_name name, char *buffer, size_t buflen)
 
   return memcpy (buffer, cptr, cptr_len + 1);
 }
-libnsl_hidden_proto (nis_domain_of_r)
+libnsl_hidden_def (nis_domain_of_r)
index c347eb7..5d910ed 100644 (file)
@@ -1,3 +1,9 @@
+2004-12-15  Jakub Jelinek  <jakub@redhat.com>
+
+       * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
+       * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
+       * sysdeps/s390/tcb-offsets.sym (TID): Add.
+
 2004-12-15  Ulrich Drepper  <drepper@redhat.com>
 
        * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
index c6e230a..237f975 100644 (file)
@@ -3,3 +3,4 @@
 
 MULTIPLE_THREADS_OFFSET                offsetof (tcbhead_t, multiple_threads)
 PID                            offsetof (struct pthread, pid)
+TID                            offsetof (struct pthread, tid)
diff --git a/nptl/sysdeps/unix/sysv/linux/s390/s390-32/clone.S b/nptl/sysdeps/unix/sysv/linux/s390/s390-32/clone.S
new file mode 100644 (file)
index 0000000..682f94d
--- /dev/null
@@ -0,0 +1,2 @@
+#define RESET_PID
+#include <sysdeps/unix/sysv/linux/s390/s390-32/clone.S>
diff --git a/nptl/sysdeps/unix/sysv/linux/s390/s390-64/clone.S b/nptl/sysdeps/unix/sysv/linux/s390/s390-64/clone.S
new file mode 100644 (file)
index 0000000..87ee2e1
--- /dev/null
@@ -0,0 +1,2 @@
+#define RESET_PID
+#include <sysdeps/unix/sysv/linux/s390/s390-64/clone.S>
index 61a35a2..f6ce115 100644 (file)
@@ -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)
index 442045b..70f695a 100644 (file)
@@ -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 */
index 724ca61..cdc6716 100644 (file)
@@ -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 */