1 /* Copyright (C) 2003 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
19 #include <sysdep-cancel.h>
23 .type __vfork, @function
31 ldq t0, __libc_pthread_functions(gp) !gprel
32 bne t0, HIDDEN_JUMPTARGET (fork) !samegp
35 ldq t0, pthread_create(gp) !literal
39 lda v0, SYS_ify(vfork)
41 bne a3, SYSCALL_ERROR_LABEL
45 /* Can't tail-call due to possible mismatch between GP in
46 fork and vfork object files. */
49 cfi_adjust_cfa_offset(16)
52 jsr ra, HIDDEN_JUMPTARGET (fork)
57 cfi_adjust_cfa_offset(-16)
65 .size __vfork, .-__vfork
67 libc_hidden_def (__vfork)
69 weak_alias (__vfork, vfork)