123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- #include <sysdep-cancel.h>
- #define _ERRNO_H 1
- #include <bits/errno.h>
- #include <kernel-features.h>
- ENTRY (__vfork)
- #ifdef __NR_vfork
- #ifdef SHARED
- ldr ip, 1f
- ldr r0, 2f
- 3: add ip, pc, ip
- ldr r0, [ip, r0]
- #else
- ldr r0, 1f
- #endif
- movs r0, r0
- bne HIDDEN_JUMPTARGET (__fork)
- DO_CALL (vfork, 0)
- cmn a1, #4096
- RETINSTR(cc, lr)
- #ifndef __ASSUME_VFORK_SYSCALL
-
- cmn a1, #ENOSYS
- bne PLTJMP(C_SYMBOL_NAME(__syscall_error))
- #endif
- #endif
- #ifndef __ASSUME_VFORK_SYSCALL
-
- DO_CALL (fork, 0)
- cmn a1, #4096
- RETINSTR(cc, lr)
- #elif !defined __NR_vfork
- # error "__NR_vfork not available and __ASSUME_VFORK_SYSCALL defined"
- #endif
- b PLTJMP(C_SYMBOL_NAME(__syscall_error))
- #ifdef SHARED
- 1: .word _GLOBAL_OFFSET_TABLE_ - 3b - 8
- 2: .word __libc_pthread_functions(GOTOFF)
- #else
- .weak pthread_create
- 1: .word pthread_create
- #endif
- PSEUDO_END (__vfork)
- libc_hidden_def (__vfork)
- weak_alias (__vfork, vfork)
|