summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/nios/vfork.S
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-01-10 02:03:25 +0000
committerMike Frysinger <vapier@gentoo.org>2006-01-10 02:03:25 +0000
commit771c60ca859f10e64489ec3aa18e4543436ba688 (patch)
treef5f3380efc214b4bdabd8ba1debe8d9537905e76 /libc/sysdeps/linux/nios/vfork.S
parent22eff99ada7e5c18e2b2962a8c03384c579ec4c8 (diff)
more fixes by Thomas Chou in Bug 618
Diffstat (limited to 'libc/sysdeps/linux/nios/vfork.S')
-rw-r--r--libc/sysdeps/linux/nios/vfork.S34
1 files changed, 15 insertions, 19 deletions
diff --git a/libc/sysdeps/linux/nios/vfork.S b/libc/sysdeps/linux/nios/vfork.S
index 22b3c30cd..cf95c5a34 100644
--- a/libc/sysdeps/linux/nios/vfork.S
+++ b/libc/sysdeps/linux/nios/vfork.S
@@ -9,7 +9,11 @@
*
* Written by Wentao Xu <wentao@microtronix.com>
*/
-#include <asm/unistd.h>
+
+#include <features.h>
+
+#include <bits/errno.h>
+#include <sys/syscall.h>
#include "NM_Macros.S"
#ifndef __NR_vfork
@@ -18,15 +22,11 @@
.text
.align 2
- .globl errno
- .globl vfork
- .globl __libc_vfork
+ .globl __vfork
#if defined __HAVE_ELF__
- .type vfork,@function
- .type __libc_vfork,@function
+ .type __vfork,@function
#endif
-vfork:
-__libc_vfork:
+__vfork:
MOVIP %g1, __NR_vfork
trap 63
@@ -34,25 +34,21 @@ __libc_vfork:
not %g1 /* (unsigned long) -4096 */
cmp %o0, %g1
skps cc_hi
- jmp %o7
- nop
-
+ jmp %o7
+ nop
+
fix_errno:
neg %o0
save %sp, -16
MOVIA %g1, __errno_location@h
call %g1
- nop
+ nop
st [%o0], %i0 /* store errno */
xor %i0, %i0
subi %i0, 1 /* retval=-1 */
ret
- restore
-
-
-
-
-
-
+ restore
+.size __vfork,.-__vfork
+strong_alias(__vfork,vfork)