fork.c 649 B

12345678910111213141516171819202122
  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. #include "sysdep.h"
  7. #if defined __NR_fork && defined __ARCH_USE_MMU__
  8. # include <cancel.h>
  9. SYSCALL__ (fork, 0)
  10. /* R1 is now 0 for the parent and 1 for the child. Decrement it to
  11. make it -1 (all bits set) for the parent, and 0 (no bits set)
  12. for the child. Then AND it with R0, so the parent gets
  13. R0&-1==R0, and the child gets R0&0==0. */
  14. /* i dunno what the blurb above is useful for. we just return. */
  15. __asm__("ret\n\tnop");
  16. lt_strong_alias(fork)
  17. lt_libc_hidden(fork)
  18. #endif