]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/l4re-core/uclibc/lib/contrib/uclibc/libc/sysdeps/linux/i386/vfork.S
Update
[l4.git] / l4 / pkg / l4re-core / uclibc / lib / contrib / uclibc / libc / sysdeps / linux / i386 / vfork.S
1 /*
2  * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
3  *
4  * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
5  */
6
7 #include <sys/syscall.h>
8
9 #ifndef __NR_vfork
10 /* No vfork so use fork instead */
11 # define __NR_vfork __NR_fork
12 #endif
13
14 .text
15 .global __vfork
16 .hidden __vfork
17 .type   __vfork,%function
18
19 __vfork:
20         popl %ecx
21
22 #ifdef SAVE_PID
23         SAVE_PID
24 #endif
25
26         movl $__NR_vfork,%eax
27         int $0x80
28         pushl %ecx
29
30 #ifdef RESTORE_PID
31         RESTORE_PID
32 #endif
33
34         cmpl $-4095,%eax
35         jae __syscall_error
36         ret
37
38 .size __vfork,.-__vfork
39
40 weak_alias(__vfork,vfork)
41 libc_hidden_def(vfork)