vfork.h 656 B

12345678910111213141516171819202122232425
  1. /* orginally from include/unistd.h, written by ndf@linux.mit.edu> */
  2. #ifndef _M68K_VFORK_H
  3. #define _M68K_VFORK_H 1
  4. extern int _clone __P ((int (*fn)(void *arg), void *child_stack, int flags, void *arg));
  5. #define vfork() ({ \
  6. register unsigned long __res __asm__ ("%d0") = __NR_fork; \
  7. __asm__ __volatile__ ("trap #0" \
  8. : "=g" (__res) \
  9. : "0" (__res) \
  10. : "%d0"); \
  11. if (__res >= (unsigned long)-4096) { \
  12. errno = -__res; \
  13. __res = (pid_t)-1; \
  14. } \
  15. (pid_t)__res; \
  16. })
  17. #define clone clone_not_available_use__clone
  18. #endif /* _M68K_VFORK_H */