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>
13 int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg, ...)
16 if (fn && child_stack)
17 rval = INTERNAL_SYSCALL(clone, 0, 2, flags, child_stack);
21 int exitCode = fn(arg);
22 rval = INTERNAL_SYSCALL(exit, 0, 1, exitCode);
30 __clone2(int (*fn)(void *arg), void *child_stack, size_t stack_size,
31 int flags, void *arg, ...)
34 if (fn && child_stack)
36 rval = INTERNAL_SYSCALL(clone2, 0, 3, flags, child_stack, stack_size);
41 int exitCode = fn(arg);
42 rval = INTERNAL_SYSCALL(exit, 0, 1, exitCode);