]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/uclibc/lib/contrib/uclibc/libc/sysdeps/linux/xtensa/fork.c
update
[l4.git] / l4 / pkg / uclibc / lib / contrib / uclibc / libc / sysdeps / linux / xtensa / fork.c
1 /* vi: set sw=4 ts=4: */
2 /*
3  * fork() for Xtensa uClibc
4  *
5  * Copyright (C) 2007 Tensilica Inc.
6  *
7  * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
8  */
9
10
11 /* Xtensa doesn't provide a 'fork' system call, so we use 'clone'.  */
12 #include <sys/syscall.h>
13
14 #if defined __NR_clone && defined __ARCH_USE_MMU__
15 # include <unistd.h>
16 # include <signal.h>
17 # include <cancel.h>
18
19 pid_t fork(void)
20 {
21         return (pid_t) INLINE_SYSCALL(clone, 2, SIGCHLD, 0);
22 }
23 lt_strong_alias(fork)
24 lt_libc_hidden(fork)
25 #endif