summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/x86_64/vfork.S
diff options
context:
space:
mode:
authorAustin Foxley <austinf@cetoncorp.com>2009-12-11 03:46:37 -0800
committerAustin Foxley <austinf@cetoncorp.com>2009-12-11 03:46:37 -0800
commit1c4f98663635995919a2fe7f9c4cbf630ae238d2 (patch)
treeb58c370583a937739249ca21a0fe64e5be8761db /libc/sysdeps/linux/x86_64/vfork.S
parent5ea195692d4e18c3fe317bcc4428777d8adab3a3 (diff)
get x86_64 nptl building
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Diffstat (limited to 'libc/sysdeps/linux/x86_64/vfork.S')
-rw-r--r--libc/sysdeps/linux/x86_64/vfork.S12
1 files changed, 10 insertions, 2 deletions
diff --git a/libc/sysdeps/linux/x86_64/vfork.S b/libc/sysdeps/linux/x86_64/vfork.S
index 2dadbbfe0..97c9c5b67 100644
--- a/libc/sysdeps/linux/x86_64/vfork.S
+++ b/libc/sysdeps/linux/x86_64/vfork.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2001, 2002, 2004, 2008 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,7 +31,7 @@
.text
.global __vfork
.hidden __vfork
-.type __vfork,%function
+.type __vfork,%function
__vfork:
@@ -39,6 +39,10 @@ __vfork:
is preserved by the syscall and that we're allowed to destroy. */
popq %rdi
+#ifdef SAVE_PID
+ SAVE_PID
+#endif
+
/* Stuff the syscall number in RAX and enter into the kernel. */
movl $__NR_vfork, %eax
syscall
@@ -46,6 +50,10 @@ __vfork:
/* Push back the return PC. */
pushq %rdi
+#ifdef RESTORE_PID
+ RESTORE_PID
+#endif
+
cmpl $-4095, %eax
jae __syscall_error /* Branch forward if it failed. */