Contents of /trunk/mkinitrd-magellan/klibc/usr/klibc/arch/sparc64/sysfork.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: 509 byte(s)
Sat Sep 1 22:45:15 2007 UTC (16 years, 8 months ago) by niro
File size: 509 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/sparc64/sysfork.S |
3 | * |
4 | * The fork and vfork system calls are special on sparc[64]: |
5 | * they return the "other process" pid in %o0 and the |
6 | * "is child" flag in %o1 |
7 | * |
8 | * Common system-call stub; %g1 already set to syscall number |
9 | */ |
10 | |
11 | .globl __syscall_forkish |
12 | .type __syscall_forkish,#function |
13 | .align 4 |
14 | __syscall_forkish: |
15 | t 0x6d |
16 | sub %o1, 1, %o1 |
17 | bcc,a %xcc, 1f |
18 | and %o0, %o1, %o0 |
19 | sethi %hi(errno), %g4 |
20 | or %g4, %lo(errno), %g4 |
21 | st %o0, [%g4] |
22 | retl |
23 | mov -1, %o0 |
24 | 1: |
25 | retl |
26 | nop |