x86_64 vfork implementation
authorRich Felker <dalias@aerifal.cx>
Mon, 6 Feb 2012 23:23:11 +0000 (18:23 -0500)
committerRich Felker <dalias@aerifal.cx>
Mon, 6 Feb 2012 23:23:11 +0000 (18:23 -0500)
untested; should work.

src/process/x86_64/vfork.s [new file with mode: 0644]

diff --git a/src/process/x86_64/vfork.s b/src/process/x86_64/vfork.s
new file mode 100644 (file)
index 0000000..27af46f
--- /dev/null
@@ -0,0 +1,12 @@
+.global __vfork
+.weak vfork
+.type __vfork,@function
+.type vfork,@function
+__vfork:
+vfork:
+       pop %rdx
+       mov $58,%eax
+       syscall
+       push %rdx
+       mov %rax,%rdi
+       jmp __syscall_ret