about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2003-06-30 23:21:49 +0000
committerRichard Henderson <rth@redhat.com>2003-06-30 23:21:49 +0000
commit874f3a78b9c1bf900df95f40e367b065ff105429 (patch)
tree921c7f2d9caca1fc405995f423efc61c36f8854a /sysdeps
parentbbf1f957c7578ac8d8c72f413cd412d5a27627b8 (diff)
downloadglibc-874f3a78b9c1bf900df95f40e367b065ff105429.tar.gz
glibc-874f3a78b9c1bf900df95f40e367b065ff105429.tar.xz
glibc-874f3a78b9c1bf900df95f40e367b065ff105429.zip
* sysdeps/unix/sysv/linux/alpha/clone.S: Load child_tid properly.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/unix/sysv/linux/alpha/clone.S16
1 files changed, 11 insertions, 5 deletions
diff --git a/sysdeps/unix/sysv/linux/alpha/clone.S b/sysdeps/unix/sysv/linux/alpha/clone.S
index a0aa7712f5..daa804c3fc 100644
--- a/sysdeps/unix/sysv/linux/alpha/clone.S
+++ b/sysdeps/unix/sysv/linux/alpha/clone.S
@@ -24,9 +24,13 @@
 #define _ERRNO_H	1
 #include <bits/errno.h>
 
-/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg,
-		       pid_t *tid, void *tls);
- */
+/* int clone(int (*fn)(void *arg), void *child_stack, int flags,
+	     void *arg, pid_t *ptid, void *tls, pid_t *ctid);
+
+   Note that everything past ARG is technically optional, based
+   on FLAGS, and that CTID is arg 7, and thus is on the stack.
+   However, since a load from top-of-stack better be legal always,
+   we don't bother checking FLAGS.  */
 
         .text
 ENTRY(__clone)
@@ -51,11 +55,13 @@ ENTRY(__clone)
 	stq	a0,0(a1)
 	stq	a3,8(a1)
 
-	/* Shift the flags, tid and tls arguments into place; the
+	/* The syscall is of the form clone(flags, usp, ptid, ctid, tls).
+	   Shift the flags, ptid, ctid, tls arguments into place; the
 	   child_stack argument is already correct.  */
 	mov	a2,a0
 	mov	a4,a2
-	mov	a5,a3
+	ldq	a3,0(sp)
+	mov	a5,a4
 
 	/* Do the system call.  */
 	ldiq	v0,__NR_clone