]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/uclibc/lib/contrib/uclibc/libc/sysdeps/linux/cris/fork.c
19aa17271811d665781a45f4c8a55f0ef5e48177
[l4.git] / l4 / pkg / uclibc / lib / contrib / uclibc / libc / sysdeps / linux / cris / fork.c
1 /*
2  * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
3  *
4  * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
5  */
6
7 #include "sysdep.h"
8
9 #define __NR___libc_fork __NR_fork
10 SYSCALL__ (__libc_fork, 0)
11         /* R1 is now 0 for the parent and 1 for the child.  Decrement it to
12            make it -1 (all bits set) for the parent, and 0 (no bits set)
13            for the child.  Then AND it with R0, so the parent gets
14            R0&-1==R0, and the child gets R0&0==0.  */
15      /* i dunno what the blurb above is useful for. we just return. */
16 __asm__("ret\n\tnop");
17 weak_alias(__libc_fork,fork)
18 libc_hidden_weak(fork)