Contents of /trunk/mkinitrd-magellan/klibc/usr/klibc/arch/i386/vfork.S
Parent Directory | Revision Log
Revision 532 -
(show annotations)
(download)
Sat Sep 1 22:45:15 2007 UTC (16 years, 8 months ago) by niro
File size: 416 byte(s)
Sat Sep 1 22:45:15 2007 UTC (16 years, 8 months ago) by niro
File size: 416 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/i386/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 4 |
12 | .globl vfork |
13 | .type vfork, @function |
14 | vfork: |
15 | popl %edx /* Return address */ |
16 | movl $__NR_vfork, %eax |
17 | int $0x80 |
18 | pushl %edx |
19 | cmpl $-4095, %eax |
20 | jae 1f |
21 | ret |
22 | 1: |
23 | negl %eax |
24 | movl %eax, errno |
25 | orl $-1, %eax |
26 | ret |