1 ! Copyright (C) 2013 Imagination Technologies Ltd.
3 ! Licensed under LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
5 #include <asm/unistd.h>
8 #include <bits/errno.h>
9 #include <sys/syscall.h>
20 #define __VFORK_NR __NR_vfork
22 #define __VFORK_NR __NR_fork
25 /* Clone the calling process, but without copying the whole address space.
26 The calling process is suspended until the new process exits or is
27 replaced by a call to `execve'. Return -1 for errors, 0 to the new process,
28 and the process ID of the new process to the old process. */
33 .type ___vfork, @function
38 MOV D1Ar1, #0x4111 /* CLONE_VM | CLONE_VFORK | SIGCHLD */
44 MOV D1Re0, #__NR_clone
49 MOVT D1Re0, #HI(-4096)
50 ADD D1Re0, D1Re0, #LO(-4096)
54 /* Syscall worked. Return to child/parent */
60 B ___syscall_error@PLT
64 .size ___vfork,.-___vfork
66 weak_alias(__vfork,vfork)
67 libc_hidden_weak(vfork)