aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-03-04 19:46:28 +0000
committerUlrich Drepper <drepper@redhat.com>2003-03-04 19:46:28 +0000
commite2b80a5802e58d8922faf4b56d275897cf0f6f18 (patch)
tree786819e895ae5c301b62da44059b684bea9fa5a5 /sysdeps/unix/sysv
parenta05be180bc97ae7390cfeaae530b593f67a4df8f (diff)
downloadglibc-e2b80a5802e58d8922faf4b56d275897cf0f6f18.tar
glibc-e2b80a5802e58d8922faf4b56d275897cf0f6f18.tar.gz
glibc-e2b80a5802e58d8922faf4b56d275897cf0f6f18.tar.bz2
glibc-e2b80a5802e58d8922faf4b56d275897cf0f6f18.zip
Update.
* sysdeps/unix/sysv/linux/x86_64/clone.S: Add support for the new clone parameters.
Diffstat (limited to 'sysdeps/unix/sysv')
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/clone.S17
1 files changed, 13 insertions, 4 deletions
diff --git a/sysdeps/unix/sysv/linux/x86_64/clone.S b/sysdeps/unix/sysv/linux/x86_64/clone.S
index 5b3520754d..c8d7becc75 100644
--- a/sysdeps/unix/sysv/linux/x86_64/clone.S
+++ b/sysdeps/unix/sysv/linux/x86_64/clone.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001,02 Free Software Foundation, Inc.
+/* Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -31,16 +31,22 @@
the kernel entry is:
int clone (long flags, void *child_stack).
- The parameters are passed in register from userland:
+ The parameters are passed in register and on the stack from userland:
rdi: fn
rsi: child_stack
rdx: flags
rcx: arg
+ r8d: TID field in parent
+ r9d: thread pointer
+%esp+8: TID field in child
The kernel expects:
rax: system call number
rdi: flags
- rsi: child_stack */
+ rsi: child_stack
+ rdx: TID field in parent
+ r10: TID field in child
+ r8: thread pointer */
.text
@@ -57,11 +63,14 @@ ENTRY (BP_SYM (__clone))
movq %rcx,8(%rsi)
/* Save the function pointer. It will be popped off in the
- child in the ebx frobbing below. */
+ child in the ebx frobbing below. */
movq %rdi,0(%rsi)
/* Do the system call. */
movq %rdx, %rdi
+ movq %r8, %rdx
+ movq %r9, %r8
+ movq 8(%rsp), %r10
movq $SYS_ify(clone),%rax
syscall