fork.c 378 B

12345678910
  1. #include <sysdep.h>
  2. SYSCALL__ (fork, 0)
  3. /* R1 is now 0 for the parent and 1 for the child. Decrement it to
  4. make it -1 (all bits set) for the parent, and 0 (no bits set)
  5. for the child. Then AND it with R0, so the parent gets
  6. R0&-1==R0, and the child gets R0&0==0. */
  7. /* i dunno what the blurb above is useful for. we just return. */
  8. __asm__("ret\n\tnop");