]> sourceware.org Git - glibc.git/blame - linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S
Update.
[glibc.git] / linuxthreads / sysdeps / unix / sysv / linux / sparc / sparc64 / vfork.S
CommitLineData
29d9a17d
UD
1/* Copyright (C) 2003 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3 Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, write to the Free
17 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
18 02111-1307 USA. */
19
20#include <sysdep-cancel.h>
21
22 .text
23ENTRY(__vfork)
62f29da7 24 ld [%g7 + MULTIPLE_THREADS_OFFSET], %o0
574b892e
UD
25#ifdef SHARED
26 cmp %o0, 0
29d9a17d 27 bne HIDDEN_JUMPTARGET (__fork)
574b892e
UD
28#else
29 brnz,pn %o0, 1f
30#endif
29d9a17d
UD
31 mov __NR_vfork, %g1
32 ta 0x6d
33 bcs,pn %xcc, __syscall_error_handler
34 nop
35 sub %o1, 1, %o1
36 retl
37 and %o0, %o1, %o0
574b892e
UD
38#ifndef SHARED
391: mov %o7, %g1
40 call HIDDEN_JUMPTARGET(__fork)
41 mov %g1, %o7
42#endif
29d9a17d
UD
43 SYSCALL_ERROR_HANDLER
44PSEUDO_END (__vfork)
45libc_hidden_def (__vfork)
46weak_alias (__vfork, vfork)
This page took 0.035746 seconds and 5 git commands to generate.