diff options
author | Jakub Jelinek <jakub@redhat.com> | 2004-12-07 14:20:59 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2004-12-07 14:20:59 +0000 |
commit | 94db64842447989c08e55d9c78328a5b4c544241 (patch) | |
tree | fd0bac340acc891d0db8299399b5cdbdc7eed190 /sysdeps/unix | |
parent | 37756a838922d080448793aa5ab5e90c5aba78c1 (diff) |
* sysdeps/unix/sysv/linux/ia64/clone2.S (__clone2): Add support for
NPTL where the PID is stored at userlevel and needs to be reset when
CLONE_THREAD is not used.
nptl/
* sysdeps/ia64/tcb-offsets.sym (TID): Add.
* sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
* Makefile (tests): Add tst-getpid2.c.
* tst-getpid1.c (TEST_CLONE_FLAGS): Define.
(do_test): Use it. Use __clone2 instead of clone on ia64.
* tst-getpid2.c: New test.
Diffstat (limited to 'sysdeps/unix')
-rw-r--r-- | sysdeps/unix/sysv/linux/ia64/clone2.S | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/ia64/clone2.S b/sysdeps/unix/sysv/linux/ia64/clone2.S index af5e009be4..136bb5591a 100644 --- a/sysdeps/unix/sysv/linux/ia64/clone2.S +++ b/sysdeps/unix/sysv/linux/ia64/clone2.S @@ -67,7 +67,23 @@ ENTRY(__clone2) (CHILD) mov out0=in4 /* Pass proper argument to fn */ (PARENT) ret ;; - ld8 gp=[in0] /* Load function gp. */ +#ifdef RESET_PID + tbit.nz p6,p0=in3,16 /* CLONE_THREAD */ + tbit.z p7,p10=in3,8 /* CLONE_VM */ +(p6) br.cond.dptk 1f + ;; + mov r15=SYS_ify (getpid) +(p10) addl r8=-1,r0 +(p7) break __BREAK_SYSCALL + ;; + add r9=PID,r13 + add r10=TID,r13 + ;; + st4 [r9]=r8 + st4 [r10]=r8 + ;; +#endif +1: ld8 gp=[in0] /* Load function gp. */ mov b6=out1 br.call.dptk.many rp=b6 /* Call fn(arg) in the child */ ;; |