OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [uClibc/] [libc/] [sysdeps/] [linux/] [v850/] [vfork.S] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1325 phoenix
/*
2
 * libc/sysdeps/linux/v850/vfork.S -- `vfork' syscall for linux/v850
3
 *
4
 *  Copyright (C) 2001,2002  NEC Corporation
5
 *  Copyright (C) 2001,2002  Miles Bader 
6
 *
7
 * This file is subject to the terms and conditions of the GNU Lesser
8
 * General Public License.  See the file COPYING.LIB in the main
9
 * directory of this archive for more details.
10
 *
11
 * Written by Miles Bader 
12
 */
13
 
14
#define _ERRNO_H        1
15
#include 
16
#define _SYSCALL_H
17
#include 
18
 
19
#include 
20
 
21
/* Clone the calling process, but without copying the whole address space.
22
   The calling process is suspended until the new process exits or is
23
   replaced by a call to `execve'.  Return -1 for errors, 0 to the new process,
24
   and the process ID of the new process to the old process.  */
25
 
26
.global C_SYMBOL_NAME(errno)
27
 
28
C_ENTRY (__vfork):
29
        addi    SYS_vfork, r0, r12
30
        trap    0
31
        addi    -125, r0, r11           // minimum err value
32
        cmp     r11, r10
33
        bh      1f
34
        jmp     [lp]                    // normal return
35
1:      mov     hilo(C_SYMBOL_NAME(errno)), r11
36
        subr    r0, r10
37
        st.w    r10, 0[r11]
38
        jmp     [lp]                    // error return
39
C_END(__vfork)
40
 
41
.weak   C_SYMBOL_NAME(vfork)
42
C_SYMBOL_NAME(vfork) = C_SYMBOL_NAME(__vfork)

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.