]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
* sysdeps/unix/sysv/linux/s390/s390-32/clone.S (__clone): Add support for
authorJakub Jelinek <jakub@redhat.com>
Wed, 15 Dec 2004 09:53:46 +0000 (09:53 +0000)
committerJakub Jelinek <jakub@redhat.com>
Wed, 15 Dec 2004 09:53:46 +0000 (09:53 +0000)
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.
nptl/
* 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.

ChangeLog
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/s390/s390-32/clone.S
sysdeps/unix/sysv/linux/s390/s390-64/clone.S

index d08630ecafa7425701b642a35250693519543082..578786756a3301761a37ceb98d73927c5825ce4f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2004-12-14  Jakub Jelinek  <jakub@redhat.com>
+
+       * 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.
+
 2004-12-15  Andreas Jaeger  <aj@suse.de>
 
        * sysdeps/ia64/dl-machine.h (elf_machine_rela): Mark auto instead
index 7d9054481fc7a3b35c9b57269039d2a1ef323130..6f8b796200d75b48ef878fc6a554bcea413418e9 100644 (file)
@@ -1,3 +1,9 @@
+2004-12-14  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 c6e230a31501f54545d10dd1a4069dae75ea5485..237f975b2583ad25a162a666eeeabdb79657192d 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 442045bf216d3a404ae7338d977acad37cb932e2..c0201f8a93f6d90ba6c9f92b181575c2c0d91eb8 100644 (file)
@@ -54,6 +54,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 724ca611eca158ff5960e44e27c6dcdec8bd932d..c58155da9cc6328b8e5fac9f1bd41af10460b430 100644 (file)
@@ -55,6 +55,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 */