diff options
Diffstat (limited to 'libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64')
12 files changed, 505 insertions, 0 deletions
diff --git a/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/CVS/Entries b/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/CVS/Entries new file mode 100644 index 000000000..825f832a3 --- /dev/null +++ b/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/CVS/Entries @@ -0,0 +1,9 @@ +D/bits//// +/Makefile/1.1/Tue Nov 15 14:20:47 2005// +/Versions/1.1/Tue Nov 15 14:20:47 2005// +/fork.h/1.1/Tue Nov 15 14:20:47 2005// +/pt-initfini.c/1.7/Tue Nov 15 14:20:47 2005// +/pt-sigsuspend.c/1.1/Tue Nov 15 14:20:47 2005// +/sysdep-cancel.h/1.10/Tue Nov 15 14:20:47 2005// +/vfork.S/1.4/Tue Nov 15 14:20:47 2005// +/dl-sysdep.h/-1.2/Wed Nov 16 20:05:14 2005// diff --git a/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/CVS/Repository b/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/CVS/Repository new file mode 100644 index 000000000..5f9ce69df --- /dev/null +++ b/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/CVS/Repository @@ -0,0 +1 @@ +ports/linuxthreads/sysdeps/unix/sysv/linux/ia64 diff --git a/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/CVS/Root b/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/CVS/Root new file mode 100644 index 000000000..ca45c5d4d --- /dev/null +++ b/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/CVS/Root @@ -0,0 +1 @@ +:pserver:anoncvs@sources.redhat.com:/cvs/glibc diff --git a/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/bits/CVS/Entries b/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/bits/CVS/Entries new file mode 100644 index 000000000..f0bf352b2 --- /dev/null +++ b/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/bits/CVS/Entries @@ -0,0 +1,2 @@ +/local_lim.h/1.3/Tue Nov 15 14:20:47 2005// +D diff --git a/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/bits/CVS/Repository b/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/bits/CVS/Repository new file mode 100644 index 000000000..74705b800 --- /dev/null +++ b/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/bits/CVS/Repository @@ -0,0 +1 @@ +ports/linuxthreads/sysdeps/unix/sysv/linux/ia64/bits diff --git a/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/bits/CVS/Root b/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/bits/CVS/Root new file mode 100644 index 000000000..ca45c5d4d --- /dev/null +++ b/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/bits/CVS/Root @@ -0,0 +1 @@ +:pserver:anoncvs@sources.redhat.com:/cvs/glibc diff --git a/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/bits/local_lim.h b/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/bits/local_lim.h new file mode 100644 index 000000000..629b1f89c --- /dev/null +++ b/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/bits/local_lim.h @@ -0,0 +1,92 @@ +/* Minimum guaranteed maximum values for system limits.  Linux/Alpha version. +   Copyright (C) 1993-1998,2000,2002,2003,2004 Free Software Foundation, Inc. +   This file is part of the GNU C Library. + +   The GNU C Library is free software; you can redistribute it and/or +   modify it under the terms of the GNU Lesser General Public License as +   published by the Free Software Foundation; either version 2.1 of the +   License, or (at your option) any later version. + +   The GNU C Library is distributed in the hope that it will be useful, +   but WITHOUT ANY WARRANTY; without even the implied warranty of +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU +   Lesser General Public License for more details. + +   You should have received a copy of the GNU Lesser General Public +   License along with the GNU C Library; see the file COPYING.LIB.  If not, +   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +   Boston, MA 02111-1307, USA.  */ + +/* The kernel header pollutes the namespace with the NR_OPEN symbol +   and defines LINK_MAX although filesystems have different maxima.  A +   similar thing is true for OPEN_MAX: the limit can be changed at +   runtime and therefore the macro must not be defined.  Remove this +   after including the header if necessary.  */ +#ifndef NR_OPEN +# define __undef_NR_OPEN +#endif +#ifndef LINK_MAX +# define __undef_LINK_MAX +#endif +#ifndef OPEN_MAX +# define __undef_OPEN_MAX +#endif + +/* The kernel sources contain a file with all the needed information.  */ +#include <linux/limits.h> + +/* Have to remove NR_OPEN?  */ +#ifdef __undef_NR_OPEN +# undef NR_OPEN +# undef __undef_NR_OPEN +#endif +/* Have to remove LINK_MAX?  */ +#ifdef __undef_LINK_MAX +# undef LINK_MAX +# undef __undef_LINK_MAX +#endif +/* Have to remove OPEN_MAX?  */ +#ifdef __undef_OPEN_MAX +# undef OPEN_MAX +# undef __undef_OPEN_MAX +#endif + +/* The number of data keys per process.  */ +#define _POSIX_THREAD_KEYS_MAX	128 +/* This is the value this implementation supports.  */ +#define PTHREAD_KEYS_MAX	1024 + +/* Controlling the iterations of destructors for thread-specific data.  */ +#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS	4 +/* Number of iterations this implementation does.  */ +#define PTHREAD_DESTRUCTOR_ITERATIONS	_POSIX_THREAD_DESTRUCTOR_ITERATIONS + +/* The number of threads per process.  */ +#define _POSIX_THREAD_THREADS_MAX	64 +/* This is the value this implementation supports.  */ +#define PTHREAD_THREADS_MAX	16384 + +/* Maximum amount by which a process can descrease its asynchronous I/O +   priority level.  */ +#define AIO_PRIO_DELTA_MAX	20 + +/* Minimum size for a thread.  We are free to choose a reasonable value.  */ +#define PTHREAD_STACK_MIN	196608 + +/* Maximum number of POSIX timers available.  */ +#define TIMER_MAX	256 + +/* Maximum number of timer expiration overruns.  */ +#define DELAYTIMER_MAX	2147483647 + +/* Maximum tty name length.  */ +#define TTY_NAME_MAX		32 + +/* Maximum login name length.  This is arbitrary.  */ +#define LOGIN_NAME_MAX		256 + +/* Maximum host name length.  */ +#define HOST_NAME_MAX		64 + +/* Maximum message queue priority level.  */ +#define MQ_PRIO_MAX		32768 diff --git a/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/fork.h b/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/fork.h new file mode 100644 index 000000000..30a0cc191 --- /dev/null +++ b/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/fork.h @@ -0,0 +1,25 @@ +/* Copyright (C) 2002 Free Software Foundation, Inc. +   This file is part of the GNU C Library. +   Contributed by Jakub Jelinek <jakub@redhat.com>, 2002. + +   The GNU C Library is free software; you can redistribute it and/or +   modify it under the terms of the GNU Lesser General Public +   License as published by the Free Software Foundation; either +   version 2.1 of the License, or (at your option) any later version. + +   The GNU C Library is distributed in the hope that it will be useful, +   but WITHOUT ANY WARRANTY; without even the implied warranty of +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU +   Lesser General Public License for more details. + +   You should have received a copy of the GNU Lesser General Public +   License along with the GNU C Library; if not, write to the Free +   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +   02111-1307 USA.  */ + +#include <signal.h> +#include <sysdep.h> + +#define ARCH_FORK() INLINE_SYSCALL (clone, 2, SIGCHLD, 0) + +#include_next <fork.h> diff --git a/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/pt-initfini.c b/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/pt-initfini.c new file mode 100644 index 000000000..af8a63c16 --- /dev/null +++ b/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/pt-initfini.c @@ -0,0 +1,142 @@ +/* Special .init and .fini section support for ia64. LinuxThreads version. +   Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc. +   This file is part of the GNU C Library. + +   The GNU C Library is free software; you can redistribute it +   and/or modify it under the terms of the GNU Lesser General Public +   License as published by the Free Software Foundation; either +   version 2.1 of the License, or (at your option) any later version. + +   In addition to the permissions in the GNU Lesser General Public +   License, the Free Software Foundation gives you unlimited +   permission to link the compiled version of this file with other +   programs, and to distribute those programs without any restriction +   coming from the use of this file.  (The Lesser General Public +   License restrictions do apply in other respects; for example, they +   cover modification of the file, and distribution when not linked +   into another program.) + +   The GNU C Library is distributed in the hope that it will be +   useful, but WITHOUT ANY WARRANTY; without even the implied warranty +   of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the +   GNU Lesser General Public License for more details. + +   You should have received a copy of the GNU Lesser General Public +   License along with the GNU C Library; see the file COPYING.LIB.  If not, +   write to the Free Software Foundation, 59 Temple Place - Suite 330, +   Boston, MA 02111-1307, USA.  */ + +/* This file is compiled into assembly code which is then munged by a sed +   script into two files: crti.s and crtn.s. + +   * crti.s puts a function prologue at the beginning of the +   .init and .fini sections and defines global symbols for +   those addresses, so they can be called as functions. + +   * crtn.s puts the corresponding function epilogues +   in the .init and .fini sections. */ + +#include <stddef.h> + +#ifdef HAVE_INITFINI_ARRAY + +# define INIT_NEW_WAY \ +    ".xdata8 \".init_array\", @fptr(__pthread_initialize_minimal)\n" +# define INIT_OLD_WAY "" +#else +# define INIT_NEW_WAY "" +# define INIT_OLD_WAY \ +	"\n\ +	st8 [r12] = gp, -16\n\ +	br.call.sptk.many b0 = __pthread_initialize_minimal# ;;\n\ +	;;\n\ +	adds r12 = 16, r12\n\ +	;;\n\ +	ld8 gp = [r12]\n\ +	;;\n" +#endif + +__asm__ ("\n\ +\n\ +#include \"defs.h\"\n\ +\n\ +/*@HEADER_ENDS*/\n\ +\n\ +/*@_init_PROLOG_BEGINS*/\n" +	INIT_NEW_WAY +	".section .init\n\ +	.align 16\n\ +	.global _init#\n\ +	.proc _init#\n\ +_init:\n\ +	.prologue\n\ +	.save ar.pfs, r34\n\ +	alloc r34 = ar.pfs, 0, 3, 0, 0\n\ +	.vframe r32\n\ +	mov r32 = r12\n\ +	.save rp, r33\n\ +	mov r33 = b0\n\ +	.body\n\ +	adds r12 = -16, r12\n\ +	;;\n" +	INIT_OLD_WAY +	".endp _init#\n\ +\n\ +/*@_init_PROLOG_ENDS*/\n\ +\n\ +/*@_init_EPILOG_BEGINS*/\n\ +	.section .init\n\ +	.proc _init#\n\ +_init:\n\ +	.prologue\n\ +	.save ar.pfs, r34\n\ +	.vframe r32\n\ +	.save rp, r33\n\ +	.body\n\ +	mov r12 = r32\n\ +	mov ar.pfs = r34\n\ +	mov b0 = r33\n\ +	br.ret.sptk.many b0\n\ +	.endp _init#\n\ +/*@_init_EPILOG_ENDS*/\n\ +\n\ +/*@_fini_PROLOG_BEGINS*/\n\ +	.section .fini\n\ +	.align 16\n\ +	.global _fini#\n\ +	.proc _fini#\n\ +_fini:\n\ +	.prologue\n\ +	.save ar.pfs, r34\n\ +	alloc r34 = ar.pfs, 0, 3, 0, 0\n\ +	.vframe r32\n\ +	mov r32 = r12\n\ +	.save rp, r33\n\ +	mov r33 = b0\n\ +	.body\n\ +	adds r12 = -16, r12\n\ +	;;\n\ +	.endp _fini#\n\ +\n\ +/*@_fini_PROLOG_ENDS*/\n\ +\n\ +/*@_fini_EPILOG_BEGINS*/\n\ +	.section .fini\n\ +	.proc _fini#\n\ +_fini:\n\ +	.prologue\n\ +	.save ar.pfs, r34\n\ +	.vframe r32\n\ +	.save rp, r33\n\ +	.body\n\ +	mov r12 = r32\n\ +	mov ar.pfs = r34\n\ +	mov b0 = r33\n\ +	br.ret.sptk.many b0\n\ +	.endp _fini#\n\ +\n\ +/*@_fini_EPILOG_ENDS*/\n\ +\n\ +/*@TRAILER_BEGINS*/\n\ +	.weak	__gmon_start__#\n\ +"); diff --git a/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/pt-sigsuspend.c b/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/pt-sigsuspend.c new file mode 100644 index 000000000..0b96e3d5b --- /dev/null +++ b/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/pt-sigsuspend.c @@ -0,0 +1,33 @@ +/* Internal sigsuspend system call for LinuxThreads.  IA64 version. +   Copyright (C) 2003 Free Software Foundation, Inc. +   This file is part of the GNU C Library. + +   The GNU C Library is free software; you can redistribute it and/or +   modify it under the terms of the GNU Lesser General Public +   License as published by the Free Software Foundation; either +   version 2.1 of the License, or (at your option) any later version. + +   The GNU C Library is distributed in the hope that it will be useful, +   but WITHOUT ANY WARRANTY; without even the implied warranty of +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU +   Lesser General Public License for more details. + +   You should have received a copy of the GNU Lesser General Public +   License along with the GNU C Library; if not, write to the Free +   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +   02111-1307 USA.  */ + +#include <errno.h> +#include <signal.h> +#include <unistd.h> + +#include <sysdep.h> +#include <sys/syscall.h> +#include <linuxthreads/internals.h> + +void +__pthread_sigsuspend (const sigset_t *set) +{ +  INTERNAL_SYSCALL_DECL (err); +  INTERNAL_SYSCALL (rt_sigsuspend, err, 2, set, _NSIG / 8); +} diff --git a/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h b/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h new file mode 100644 index 000000000..dd9637d2b --- /dev/null +++ b/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h @@ -0,0 +1,144 @@ +/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. +   This file is part of the GNU C Library. +   Contributed by Jakub Jelinek <jakub@redhat.com>, 2002. + +   The GNU C Library is free software; you can redistribute it and/or +   modify it under the terms of the GNU Lesser General Public +   License as published by the Free Software Foundation; either +   version 2.1 of the License, or (at your option) any later version. + +   The GNU C Library is distributed in the hope that it will be useful, +   but WITHOUT ANY WARRANTY; without even the implied warranty of +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU +   Lesser General Public License for more details. + +   You should have received a copy of the GNU Lesser General Public +   License along with the GNU C Library; if not, write to the Free +   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +   02111-1307 USA.  */ + +#include <sysdep.h> +#include <tls.h> +#ifndef __ASSEMBLER__ +# include <linuxthreads/internals.h> +#endif + +#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt + +# ifdef IS_IN_librt +#  define PSEUDO_NLOCAL		6 +#  define PSEUDO_SAVE_GP	mov loc5 = gp +#  define PSEUDO_RESTORE_GP	mov gp = loc5 +#  define PSEUDO_SAVE_GP_1 +#  define PSEUDO_RESTORE_GP_1	mov gp = loc5 +# else +#  define PSEUDO_NLOCAL		5 +#  define PSEUDO_SAVE_GP +#  define PSEUDO_RESTORE_GP +#  define PSEUDO_SAVE_GP_1	mov loc4 = gp;; +#  define PSEUDO_RESTORE_GP_1	mov gp = loc4 +# endif + +# undef PSEUDO +# define PSEUDO(name, syscall_name, args)				      \ +.text;									      \ +ENTRY (name)								      \ +     adds r14 = MULTIPLE_THREADS_OFFSET, r13;;				      \ +     ld4 r14 = [r14];							      \ +     mov r15 = SYS_ify(syscall_name);;					      \ +     cmp4.ne p6, p7 = 0, r14;						      \ +(p6) br.cond.spnt .Lpseudo_cancel;;					      \ +     break __BREAK_SYSCALL;;						      \ +     cmp.eq p6,p0=-1,r10;						      \ +(p6) br.cond.spnt.few __syscall_error;					      \ +     ret;;								      \ +     .endp name;							      \ +     .proc __GC_##name;							      \ +     .globl __GC_##name;						      \ +     .hidden __GC_##name;						      \ +__GC_##name:								      \ +.Lpseudo_cancel:							      \ +     .prologue;								      \ +     .regstk args, PSEUDO_NLOCAL, args, 0;				      \ +     .save ar.pfs, loc0;						      \ +     alloc loc0 = ar.pfs, args, PSEUDO_NLOCAL, args, 0;			      \ +     .save rp, loc1;							      \ +     mov loc1 = rp;							      \ +     PSEUDO_SAVE_GP;;							      \ +     .body;								      \ +     CENABLE;;								      \ +     PSEUDO_RESTORE_GP;							      \ +     mov loc2 = r8;							      \ +     COPY_ARGS_##args							      \ +     mov r15 = SYS_ify(syscall_name);					      \ +     break __BREAK_SYSCALL;;						      \ +     mov loc3 = r8;							      \ +     mov loc4 = r10;							      \ +     mov out0 = loc2;							      \ +     CDISABLE;;								      \ +     PSEUDO_RESTORE_GP;							      \ +     cmp.eq p6,p0=-1,loc4;						      \ +(p6) br.cond.spnt.few __syscall_error_##args;				      \ +     mov r8 = loc3;							      \ +     mov rp = loc1;							      \ +     mov ar.pfs = loc0;							      \ +.Lpseudo_end:								      \ +     ret;								      \ +     .endp __GC_##name;							      \ +.section .gnu.linkonce.t.__syscall_error_##args, "ax";			      \ +     .align 32;								      \ +     .proc __syscall_error_##args;					      \ +     .global __syscall_error_##args;					      \ +     .hidden __syscall_error_##args;					      \ +     .size __syscall_error_##args, 64;					      \ +__syscall_error_##args:							      \ +     .prologue;								      \ +     .regstk args, PSEUDO_NLOCAL, args, 0;				      \ +     .save ar.pfs, loc0;						      \ +     .save rp, loc1;							      \ +     .body;								      \ +     PSEUDO_SAVE_GP_1;							      \ +     br.call.sptk.many b0 = __errno_location;;				      \ +     st4 [r8] = loc3;							      \ +     PSEUDO_RESTORE_GP_1;						      \ +     mov rp = loc1;							      \ +     mov r8 = -1;							      \ +     mov ar.pfs = loc0 + +#undef PSEUDO_END +#define PSEUDO_END(name) .endp + +# ifdef IS_IN_libpthread +#  define CENABLE	br.call.sptk.many b0 = __pthread_enable_asynccancel +#  define CDISABLE	br.call.sptk.many b0 = __pthread_disable_asynccancel +# elif !defined NOT_IN_libc +#  define CENABLE	br.call.sptk.many b0 = __libc_enable_asynccancel +#  define CDISABLE	br.call.sptk.many b0 = __libc_disable_asynccancel +# else +#  define CENABLE	br.call.sptk.many b0 = __librt_enable_asynccancel +#  define CDISABLE	br.call.sptk.many b0 = __librt_disable_asynccancel +# endif + +#define COPY_ARGS_0	/* Nothing */ +#define COPY_ARGS_1	COPY_ARGS_0 mov out0 = in0; +#define COPY_ARGS_2	COPY_ARGS_1 mov out1 = in1; +#define COPY_ARGS_3	COPY_ARGS_2 mov out2 = in2; +#define COPY_ARGS_4	COPY_ARGS_3 mov out3 = in3; +#define COPY_ARGS_5	COPY_ARGS_4 mov out4 = in4; +#define COPY_ARGS_6	COPY_ARGS_5 mov out5 = in5; +#define COPY_ARGS_7	COPY_ARGS_6 mov out6 = in6; + +# ifndef __ASSEMBLER__ +#  define SINGLE_THREAD_P \ +  __builtin_expect (THREAD_GETMEM (THREAD_SELF, p_multiple_threads) == 0, 1) +# else +#  define SINGLE_THREAD_P \ +  adds r14 = MULTIPLE_THREADS_OFFSET, r13 ;; ld4 r14 = [r14] ;; cmp4.ne p6, p7 = 0, r14 +# endif + +#elif !defined __ASSEMBLER__ + +/* This code should never be used but we define it anyhow.  */ +# define SINGLE_THREAD_P (1) + +#endif diff --git a/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/vfork.S b/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/vfork.S new file mode 100644 index 000000000..54acedad4 --- /dev/null +++ b/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/vfork.S @@ -0,0 +1,54 @@ +/* Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc. +   This file is part of the GNU C Library. + +   The GNU C Library is free software; you can redistribute it and/or +   modify it under the terms of the GNU Lesser General Public +   License as published by the Free Software Foundation; either +   version 2.1 of the License, or (at your option) any later version. + +   The GNU C Library is distributed in the hope that it will be useful, +   but WITHOUT ANY WARRANTY; without even the implied warranty of +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU +   Lesser General Public License for more details. + +   You should have received a copy of the GNU Lesser General Public +   License along with the GNU C Library; if not, write to the Free +   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +   02111-1307 USA.  */ + + +#include <sysdep-cancel.h> +#define _SIGNAL_H +#include <bits/signum.h> + +/* The following are defined in linux/sched.h, which unfortunately	*/ +/* is not safe for inclusion in an assembly file.			*/ +#define CLONE_VM        0x00000100      /* set if VM shared between processes */ +#define CLONE_VFORK     0x00004000      /* set if the parent wants the child to wake it up on mm_release */ + +/* pid_t vfork(void); */ +/* Implemented as __clone_syscall(CLONE_VFORK | CLONE_VM | SIGCHLD, 0)	*/ + +ENTRY(__vfork) +#ifdef SHARED +	addl r14 = @gprel(__libc_pthread_functions#), gp;; +#else +	.weak	pthread_create +	addl r14 = @ltoff(@fptr(pthread_create#)), gp;; +#endif +	ld8 r14 = [r14];; +	cmp.ne p6, p7 = 0, r14 +(p6)	br.cond.spnt.few HIDDEN_JUMPTARGET (__fork);; +	alloc r2=ar.pfs,0,0,2,0 +	mov out0=CLONE_VM+CLONE_VFORK+SIGCHLD +	mov out1=0		/* Standard sp value.			*/ +	;; +	DO_CALL (SYS_ify (clone)) +	cmp.eq p6,p0=-1,r10 +	;; +(p6)	br.cond.spnt.few __syscall_error +	ret +PSEUDO_END(__vfork) +libc_hidden_def (__vfork) + +weak_alias (__vfork, vfork)  | 
