Magellan Linux

Contents of /trunk/mkinitrd-magellan/klibc/usr/klibc/arch/arm/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: 702 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 * arch/arm/vfork.S
3 *
4 * vfork - nasty system call which must not use the stack.
5 */
6
7 #include <asm/unistd.h>
8
9 .type vfork,#function
10 .globl vfork
11 #ifndef __thumb__
12
13 .balign 4
14 vfork:
15 #ifdef __ARM_EABI__
16 mov r3, r7
17 mov r7, # __NR_vfork
18 swi 0
19 mov r7, r3
20 #else
21 swi # __NR_vfork
22 #endif
23 cmn r0, #4096
24 rsbcs r2, r0, #0
25 ldrcs r3, 1f
26 mvncs r0, #0
27 strcs r2, [r3]
28 mov pc, lr
29
30 .balign 4
31 1:
32 .word errno
33
34 #else
35
36 .thumb_func
37 .balign 2
38 vfork:
39 mov r3, r7
40 mov r7, # __NR_vfork
41 swi 0
42 mov r7, r3
43 ldr r1, 2f
44 cmp r0, r1
45 bcc 1f
46 ldr r1, 3f
47 neg r2, r0
48 mov r0, #1
49 str r2, [r1]
50 neg r0, r0
51 1:
52 mov pc, lr
53
54 .balign 4
55 2:
56 .word -4095
57 3:
58 .word errno
59
60 #endif