123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- #include <features.h>
- #include <bits/errno.h>
- #include <sys/syscall.h>
- #include "NM_Macros.S"
- #ifndef __NR_vfork
- #define __NR_vfork __NR_fork
- #endif
- .text
- .align 2
- .globl __vfork
- .hidden __vfork
- .type __vfork,@function
- __vfork:
- MOVIP %g1, __NR_vfork
- trap 63
-
- bgen %g1, 12
- not %g1
- cmp %o0, %g1
- skps cc_hi
- jmp %o7
- nop
-
- fix_errno:
- neg %o0
- save %sp, -16
- MOVIA %g1, __errno_location@h
- call %g1
- nop
- st [%o0], %i0
-
- xor %i0, %i0
- subi %i0, 1
- ret
- restore
- .size __vfork,.-__vfork
- weak_alias(__vfork,vfork)
- libc_hidden_weak(vfork)
|