vfork.S 500 B

1234567891011121314151617181920212223242526272829
  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 <sys/syscall.h>
  7. #ifndef __NR_vfork
  8. /* No vfork so use fork instead */
  9. # define __NR_vfork __NR_fork
  10. #endif
  11. .text
  12. .global __vfork
  13. .hidden __vfork
  14. .type __vfork,@function
  15. .type __syscall_error,@function
  16. __vfork:
  17. li 0, __NR_vfork
  18. sc
  19. bnslr+
  20. b __syscall_error
  21. .size __vfork,.-__vfork
  22. weak_alias(__vfork,vfork)
  23. libc_hidden_weak(vfork)