chiark / gitweb /
Make run_directory.c stat the place it is going to try to run.
[elogind.git] / klibc / klibc / arch / sparc / sysfork.S
1 /*
2  * arch/sparc/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       0x10
16         sub     %o1, 1, %o1
17         bcc,a   1f
18           and   %o0, %o1, %o0
19         sethi   %hi(errno), %g4
20         or      %g4, %lo(errno), %g4
21         st      %o0,[%g4]
22         mov     -1, %o0
23 1:
24         retl
25           nop