diff options
| author | "Steven J. Hill" <sjhill@realitydiluted.com> | 2005-07-25 02:29:20 +0000 |
|---|---|---|
| committer | "Steven J. Hill" <sjhill@realitydiluted.com> | 2005-07-25 02:29:20 +0000 |
| commit | ff45f14ea255d442f779157db133d73777675a5c (patch) | |
| tree | eafe5f8052f5e3fb0f50c48d3b8fdd371445c302 /libc/sysdeps/linux/arm/vfork.S | |
| parent | 1d2230a7d275706c5f0de850e15527aae3744310 (diff) | |
| download | uClibc-alpine-ff45f14ea255d442f779157db133d73777675a5c.tar.bz2 uClibc-alpine-ff45f14ea255d442f779157db133d73777675a5c.tar.xz | |
A merging we will go. A merging we will go. Hi ho the merrio' a merging we will go.
Diffstat (limited to 'libc/sysdeps/linux/arm/vfork.S')
| -rw-r--r-- | libc/sysdeps/linux/arm/vfork.S | 63 |
1 files changed, 24 insertions, 39 deletions
diff --git a/libc/sysdeps/linux/arm/vfork.S b/libc/sysdeps/linux/arm/vfork.S index 9d18945d1..cf9d3d8d6 100644 --- a/libc/sysdeps/linux/arm/vfork.S +++ b/libc/sysdeps/linux/arm/vfork.S @@ -20,52 +20,37 @@ * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include <asm/errno.h> +#define _ERRNO_H +#include <bits/errno.h> #include <sys/syscall.h> - - - .text - .global vfork; - .type vfork,%function - .align 4; \ - - - +#ifdef __NR_fork +.text +.global vfork +.type vfork,%function +.align 4 vfork: #ifdef __NR_vfork - swi __NR_vfork - cmn r0, #4096 - movcc pc, lr - - /* Check if vfork even exists. */ - ldr r1, =-ENOSYS - teq r0, r1 - bne __syscall_error + swi __NR_vfork + cmn r0, #4096 + movcc pc, lr + + /* Check if vfork even exists. */ + ldr r1, =-ENOSYS + teq r0, r1 + bne __error #endif - /* If we don't have vfork, use fork. */ - swi __NR_fork - cmn r0, #4096 + /* If we don't have vfork, use fork. */ + swi __NR_fork + cmn r0, #4096 - /* Syscal worked. Return to child/parent */ - movcc pc, lr - -__syscall_error: - - /* Looks like the syscall choked -- set errno */ - ldr r3, .L4 - /* Calculate the - of the syscall result, in case we need it */ - rsb r2, r0, $0 - - /* errno = -result */ - str r2, [r9,r3] - - /* return -1 */ - mvn r0, $0 - mov pc, lr - -.L4: .word errno + /* Syscal worked. Return to child/parent */ + movcc pc, lr +__error: + b __syscall_error +.size vfork,.-vfork +#endif |
