Magellan Linux

Contents of /trunk/mkinitrd-magellan/klibc/usr/klibc/arch/m68k/vfork.S

Parent Directory Parent Directory | Revision Log Revision Log


Revision 532 - (show annotations) (download)
Sat Sep 1 22:45:15 2007 UTC (16 years, 8 months ago) by niro
File size: 460 byte(s)
-import if magellan mkinitrd; it is a fork of redhats mkinitrd-5.0.8 with all magellan patches and features; deprecates magellan-src/mkinitrd

1 #
2 # usr/klibc/arch/m68k/vfork.S
3 #
4 # vfork is nasty - there must be nothing at all on the stack above
5 # the stack frame of the enclosing function.
6 #
7
8 #include <asm/unistd.h>
9
10 .text
11 .align 2
12 .globl vfork
13 .type vfork, @function
14 vfork:
15 move.l (%sp)+, %d1 /* Return address */
16 move.l # __NR_vfork, %d0
17 trap #0
18 move.l %d1, -(%sp)
19 cmpi.l #-4095, %d0
20 blt.l 1f
21 neg.l %d0
22 move.l %d0, (errno)
23 moveq #-1, %d0
24 1:
25 movea.l %d0, %a0
26 rts
27
28 .size vfork, .-vfork