Blame sysdeps/unix/sysv/linux/aarch64/pt-vfork.c

Packit Service c82647
/* vfork ABI-compatibility entry points for libpthread.
Packit Service c82647
   Copyright (C) 2014-2018 Free Software Foundation, Inc.
Packit Service c82647
   This file is part of the GNU C Library.
Packit Service c82647
Packit Service c82647
   The GNU C Library is free software; you can redistribute it and/or
Packit Service c82647
   modify it under the terms of the GNU Lesser General Public
Packit Service c82647
   License as published by the Free Software Foundation; either
Packit Service c82647
   version 2.1 of the License, or (at your option) any later version.
Packit Service c82647
Packit Service c82647
   The GNU C Library is distributed in the hope that it will be useful,
Packit Service c82647
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service c82647
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit Service c82647
   Lesser General Public License for more details.
Packit Service c82647
Packit Service c82647
   You should have received a copy of the GNU Lesser General Public
Packit Service c82647
   License along with the GNU C Library; if not, see
Packit Service c82647
   <http://www.gnu.org/licenses/>.  */
Packit Service c82647
Packit Service c82647
#include <shlib-compat.h>
Packit Service c82647
Packit Service c82647
/* libpthread used to have its own vfork implementation that differed
Packit Service c82647
   from libc's only in having a pointless micro-optimization.  There
Packit Service c82647
   is no longer any use to having a separate copy in libpthread, but
Packit Service c82647
   the historical ABI requires it.  For static linking, there is no
Packit Service c82647
   need to provide anything here--the libc version will be linked in.
Packit Service c82647
   For shared library ABI compatibility, there must be __vfork and
Packit Service c82647
   vfork symbols in libpthread.so.  */
Packit Service c82647
Packit Service c82647
#if HAVE_IFUNC
Packit Service c82647
# include <nptl/pt-vfork.c>
Packit Service c82647
#elif (SHLIB_COMPAT (libpthread, GLIBC_2_0, GLIBC_2_20) \
Packit Service c82647
       || SHLIB_COMPAT (libpthread, GLIBC_2_1_2, GLIBC_2_20))
Packit Service c82647
Packit Service c82647
/* Thankfully, on AArch64 we can rely on the compiler generating
Packit Service c82647
   a tail call here.  */
Packit Service c82647
Packit Service c82647
extern void __libc_vfork (void);
Packit Service c82647
Packit Service c82647
void
Packit Service c82647
vfork_compat (void)
Packit Service c82647
{
Packit Service c82647
  __libc_vfork ();
Packit Service c82647
}
Packit Service c82647
Packit Service c82647
# if SHLIB_COMPAT (libpthread, GLIBC_2_0, GLIBC_2_20)
Packit Service c82647
compat_symbol (libpthread, vfork_compat, vfork, GLIBC_2_0);
Packit Service c82647
# endif
Packit Service c82647
Packit Service c82647
# if SHLIB_COMPAT (libpthread, GLIBC_2_1_2, GLIBC_2_20)
Packit Service c82647
strong_alias (vfork_compat, vfork_compat2)
Packit Service c82647
compat_symbol (libpthread, vfork_compat2, __vfork, GLIBC_2_1_2);
Packit Service c82647
# endif
Packit Service c82647
Packit Service c82647
#endif