2 * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
4 * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
7 #include <sys/syscall.h>
10 /* No legacy syscall ABI means NR_vfork is not available at all, use clone */
12 #include <bits/signum.h> /* For SIGCHLD */
14 #define CLONE_VM 0x00000100
15 #define CLONE_VFORK 0x00004000
16 #define CLONE_FLAGS_FOR_VFORK (CLONE_VM|CLONE_VFORK|SIGCHLD)
19 mov r0, CLONE_FLAGS_FOR_VFORK
25 jge [blink] ; pid >=0 return, else detour via tailcall to errno
30 weak_alias(__vfork,vfork)
31 libc_hidden_def(vfork)