2 * Copyright (C) 2004 Atmel Corporation
4 * This file is subject to the terms and conditions of the GNU Lesser General
5 * Public License. See the file "COPYING.LIB" in the main directory of this
6 * archive for more details.
10 #include <sys/syscall.h>
14 * I don't know if we can be absolutely certain that the fn and arg
15 * parameters are preserved when returning as the child. If the
16 * compiler stores them in registers (r0-r7), they should be.
18 int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg, ...)
20 register int (*_fn)(void *arg) = fn;
21 register void *_arg = arg;
24 /* Sanity check the arguments */
31 err = INLINE_SYSCALL(clone, 2, flags, child_stack);