From 0ecb606cb6cf65de1d9fc8a919bceb4be476c602 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 12 Jul 2007 18:26:36 +0000 Subject: 2.5-18.1 --- linuxthreads/sysdeps/unix/sysv/linux/Implies | 1 - linuxthreads/sysdeps/unix/sysv/linux/Makefile | 3 - linuxthreads/sysdeps/unix/sysv/linux/Versions | 5 - linuxthreads/sysdeps/unix/sysv/linux/allocalim.h | 26 -- linuxthreads/sysdeps/unix/sysv/linux/allocrtsig.c | 87 ------- .../sysdeps/unix/sysv/linux/alpha/Makefile | 3 - .../sysdeps/unix/sysv/linux/alpha/Versions | 6 - .../sysdeps/unix/sysv/linux/alpha/aio_cancel.c | 33 --- .../sysdeps/unix/sysv/linux/alpha/bits/local_lim.h | 92 ------- .../sysdeps/unix/sysv/linux/alpha/bits/typesizes.h | 66 ----- .../sysdeps/unix/sysv/linux/alpha/pt-sigsuspend.S | 28 -- .../sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h | 146 ----------- linuxthreads/sysdeps/unix/sysv/linux/alpha/vfork.S | 70 ----- .../sysdeps/unix/sysv/linux/arm/sysdep-cancel.h | 145 ----------- linuxthreads/sysdeps/unix/sysv/linux/arm/vfork.S | 80 ------ .../sysdeps/unix/sysv/linux/bits/local_lim.h | 92 ------- .../sysdeps/unix/sysv/linux/bits/posix_opt.h | 181 ------------- .../sysdeps/unix/sysv/linux/bits/sigthread.h | 38 --- linuxthreads/sysdeps/unix/sysv/linux/execve.c | 73 ------ linuxthreads/sysdeps/unix/sysv/linux/fork.c | 43 --- linuxthreads/sysdeps/unix/sysv/linux/fork.h | 60 ----- .../sysdeps/unix/sysv/linux/hppa/aio_cancel.c | 33 --- .../sysdeps/unix/sysv/linux/hppa/bits/initspin.h | 27 -- .../sysdeps/unix/sysv/linux/hppa/malloc-machine.h | 73 ------ .../sysdeps/unix/sysv/linux/hppa/pt-initfini.c | 109 -------- .../sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h | 189 -------------- .../sysdeps/unix/sysv/linux/i386/dl-sysdep.h | 64 ----- .../sysdeps/unix/sysv/linux/i386/sysdep-cancel.h | 179 ------------- linuxthreads/sysdeps/unix/sysv/linux/i386/vfork.S | 95 ------- linuxthreads/sysdeps/unix/sysv/linux/ia64/Makefile | 3 - linuxthreads/sysdeps/unix/sysv/linux/ia64/Versions | 6 - .../sysdeps/unix/sysv/linux/ia64/bits/local_lim.h | 92 ------- .../sysdeps/unix/sysv/linux/ia64/dl-sysdep.h | 49 ---- linuxthreads/sysdeps/unix/sysv/linux/ia64/fork.h | 25 -- .../sysdeps/unix/sysv/linux/ia64/pt-initfini.c | 140 ---------- .../sysdeps/unix/sysv/linux/ia64/pt-sigsuspend.c | 33 --- .../sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h | 144 ----------- linuxthreads/sysdeps/unix/sysv/linux/ia64/vfork.S | 54 ---- linuxthreads/sysdeps/unix/sysv/linux/jmp-unwind.c | 34 --- .../sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h | 129 --------- linuxthreads/sysdeps/unix/sysv/linux/m68k/vfork.S | 84 ------ linuxthreads/sysdeps/unix/sysv/linux/mips/Makefile | 3 - .../unix/sysv/linux/mips/mips64/sysdep-cancel.h | 144 ----------- .../sysdeps/unix/sysv/linux/mips/sysdep-cancel.h | 143 ---------- linuxthreads/sysdeps/unix/sysv/linux/mq_notify.c | 287 --------------------- .../sysdeps/unix/sysv/linux/powerpc/Makefile | 2 - .../sysdeps/unix/sysv/linux/powerpc/Versions | 5 - .../sysv/linux/powerpc/powerpc32/sysdep-cancel.h | 131 ---------- .../unix/sysv/linux/powerpc/powerpc32/vfork.S | 78 ------ .../sysv/linux/powerpc/powerpc64/sysdep-cancel.h | 127 --------- .../unix/sysv/linux/powerpc/powerpc64/vfork.S | 91 ------- .../sysdeps/unix/sysv/linux/powerpc/ptlongjmp.c | 70 ----- .../sysdeps/unix/sysv/linux/pt-sigsuspend.c | 56 ---- linuxthreads/sysdeps/unix/sysv/linux/raise.c | 36 --- .../sysdeps/unix/sysv/linux/register-atfork.c | 88 ------- .../sysdeps/unix/sysv/linux/s390/bits/typesizes.h | 72 ------ .../unix/sysv/linux/s390/s390-32/pt-initfini.c | 154 ----------- .../unix/sysv/linux/s390/s390-32/sysdep-cancel.h | 137 ---------- .../sysdeps/unix/sysv/linux/s390/s390-32/vfork.S | 69 ----- .../unix/sysv/linux/s390/s390-64/pt-initfini.c | 137 ---------- .../unix/sysv/linux/s390/s390-64/pt-sigsuspend.c | 1 - .../unix/sysv/linux/s390/s390-64/sysdep-cancel.h | 116 --------- .../sysdeps/unix/sysv/linux/s390/s390-64/vfork.S | 54 ---- .../sysdeps/unix/sysv/linux/sh/pt-initfini.c | 143 ---------- linuxthreads/sysdeps/unix/sysv/linux/sh/smp.h | 24 -- .../sysdeps/unix/sysv/linux/sh/sysdep-cancel.h | 227 ---------------- linuxthreads/sysdeps/unix/sysv/linux/sh/vfork.S | 77 ------ linuxthreads/sysdeps/unix/sysv/linux/sigwait.c | 88 ------- linuxthreads/sysdeps/unix/sysv/linux/smp.h | 48 ---- .../sysdeps/unix/sysv/linux/sparc/Versions | 6 - .../sysdeps/unix/sysv/linux/sparc/aio_cancel.c | 33 --- .../sysdeps/unix/sysv/linux/sparc/bits/local_lim.h | 92 ------- .../sysdeps/unix/sysv/linux/sparc/bits/typesizes.h | 66 ----- linuxthreads/sysdeps/unix/sysv/linux/sparc/fork.h | 34 --- .../unix/sysv/linux/sparc/sparc32/sysdep-cancel.h | 102 -------- .../sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S | 65 ----- .../sysdeps/unix/sysv/linux/sparc/sparc64/Makefile | 5 - .../unix/sysv/linux/sparc/sparc64/pt-sigsuspend.c | 1 - .../unix/sysv/linux/sparc/sparc64/sysdep-cancel.h | 101 -------- .../sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S | 64 ----- .../sysdeps/unix/sysv/linux/unregister-atfork.c | 49 ---- .../sysdeps/unix/sysv/linux/x86_64/Makefile | 4 - .../sysdeps/unix/sysv/linux/x86_64/pt-sigsuspend.c | 1 - .../sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h | 132 ---------- .../sysdeps/unix/sysv/linux/x86_64/vfork.S | 62 ----- 85 files changed, 6265 deletions(-) delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/Implies delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/Makefile delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/Versions delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/allocalim.h delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/allocrtsig.c delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/alpha/Makefile delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/alpha/Versions delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/alpha/aio_cancel.c delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/alpha/bits/local_lim.h delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/alpha/pt-sigsuspend.S delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/alpha/vfork.S delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/arm/sysdep-cancel.h delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/arm/vfork.S delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/bits/local_lim.h delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/bits/posix_opt.h delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/bits/sigthread.h delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/execve.c delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/fork.c delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/fork.h delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/hppa/aio_cancel.c delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/hppa/bits/initspin.h delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/hppa/malloc-machine.h delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/hppa/pt-initfini.c delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/i386/dl-sysdep.h delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/i386/sysdep-cancel.h delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/i386/vfork.S delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/ia64/Makefile delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/ia64/Versions delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/ia64/bits/local_lim.h delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/ia64/dl-sysdep.h delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/ia64/fork.h delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/ia64/pt-initfini.c delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/ia64/pt-sigsuspend.c delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/ia64/vfork.S delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/jmp-unwind.c delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/m68k/vfork.S delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/mips/Makefile delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/mips/sysdep-cancel.h delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/mq_notify.c delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/powerpc/Makefile delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/powerpc/Versions delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/powerpc/ptlongjmp.c delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/pt-sigsuspend.c delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/raise.c delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/register-atfork.c delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/s390/bits/typesizes.h delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/s390/s390-32/vfork.S delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/s390/s390-64/pt-sigsuspend.c delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/s390/s390-64/vfork.S delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/sh/pt-initfini.c delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/sh/smp.h delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/sh/sysdep-cancel.h delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/sh/vfork.S delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/sigwait.c delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/smp.h delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/sparc/Versions delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/sparc/aio_cancel.c delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/sparc/bits/local_lim.h delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/sparc/bits/typesizes.h delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/sparc/fork.h delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc64/Makefile delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc64/pt-sigsuspend.c delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/unregister-atfork.c delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/x86_64/Makefile delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/x86_64/pt-sigsuspend.c delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h delete mode 100644 linuxthreads/sysdeps/unix/sysv/linux/x86_64/vfork.S (limited to 'linuxthreads/sysdeps/unix/sysv/linux') diff --git a/linuxthreads/sysdeps/unix/sysv/linux/Implies b/linuxthreads/sysdeps/unix/sysv/linux/Implies deleted file mode 100644 index f1b3e8939c..0000000000 --- a/linuxthreads/sysdeps/unix/sysv/linux/Implies +++ /dev/null @@ -1 +0,0 @@ -pthread diff --git a/linuxthreads/sysdeps/unix/sysv/linux/Makefile b/linuxthreads/sysdeps/unix/sysv/linux/Makefile deleted file mode 100644 index 38c6cbc1af..0000000000 --- a/linuxthreads/sysdeps/unix/sysv/linux/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -ifeq ($(subdir),linuxthreads) -sysdep_routines += register-atfork unregister-atfork -endif diff --git a/linuxthreads/sysdeps/unix/sysv/linux/Versions b/linuxthreads/sysdeps/unix/sysv/linux/Versions deleted file mode 100644 index 6cd3dbe372..0000000000 --- a/linuxthreads/sysdeps/unix/sysv/linux/Versions +++ /dev/null @@ -1,5 +0,0 @@ -libc { - GLIBC_2.3.2 { - __register_atfork; - } -} diff --git a/linuxthreads/sysdeps/unix/sysv/linux/allocalim.h b/linuxthreads/sysdeps/unix/sysv/linux/allocalim.h deleted file mode 100644 index f62f7d6e9f..0000000000 --- a/linuxthreads/sysdeps/unix/sysv/linux/allocalim.h +++ /dev/null @@ -1,26 +0,0 @@ -/* Determine whether block of given size can be allocated on the stack or not. - Copyright (C) 2002 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library 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. */ - -#include - -extern inline int __libc_use_alloca (size_t size) -{ - return (__builtin_expect (size <= PTHREAD_STACK_MIN / 4, 1) - || __libc_alloca_cutoff (size)); -} diff --git a/linuxthreads/sysdeps/unix/sysv/linux/allocrtsig.c b/linuxthreads/sysdeps/unix/sysv/linux/allocrtsig.c deleted file mode 100644 index af1581a4c3..0000000000 --- a/linuxthreads/sysdeps/unix/sysv/linux/allocrtsig.c +++ /dev/null @@ -1,87 +0,0 @@ -/* Handle real-time signal allocation. - Copyright (C) 1997,98,99,2002 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 1997. - - 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 - -/* Sanity check. */ -#if !defined __SIGRTMIN || (__SIGRTMAX - __SIGRTMIN) < 3 -# error "This must not happen" -#endif - -static int current_rtmin; -static int current_rtmax; - -static int initialized; - -#include - -static void -init (void) -{ - if (!kernel_has_rtsig ()) - { - current_rtmin = -1; - current_rtmax = -1; - } - else - { - current_rtmin = __SIGRTMIN + 3; - current_rtmax = __SIGRTMAX; - } - initialized = 1; -} - -/* Return number of available real-time signal with highest priority. */ -int -__libc_current_sigrtmin (void) -{ - if (!initialized) - init (); - return current_rtmin; -} -strong_alias (__libc_current_sigrtmin, __libc_current_sigrtmin_private); -libc_hidden_def (__libc_current_sigrtmin) - -/* Return number of available real-time signal with lowest priority. */ -int -__libc_current_sigrtmax (void) -{ - if (!initialized) - init (); - return current_rtmax; -} -strong_alias (__libc_current_sigrtmax, __libc_current_sigrtmax_private); -libc_hidden_def (__libc_current_sigrtmax) - -/* Allocate real-time signal with highest/lowest available - priority. Please note that we don't use a lock since we assume - this function to be called at program start. */ -int -__libc_allocate_rtsig (int high) -{ - if (!initialized) - init (); - if (current_rtmin == -1 || current_rtmin > current_rtmax) - /* We don't have anymore signal available. */ - return -1; - - return high ? current_rtmin++ : current_rtmax--; -} -strong_alias (__libc_allocate_rtsig, __libc_allocate_rtsig_private); diff --git a/linuxthreads/sysdeps/unix/sysv/linux/alpha/Makefile b/linuxthreads/sysdeps/unix/sysv/linux/alpha/Makefile deleted file mode 100644 index e03aee99fc..0000000000 --- a/linuxthreads/sysdeps/unix/sysv/linux/alpha/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -ifeq ($(subdir),linuxthreads) -libpthread-routines += ptw-sysdep ptw-sigblock ptw-sigprocmask -endif diff --git a/linuxthreads/sysdeps/unix/sysv/linux/alpha/Versions b/linuxthreads/sysdeps/unix/sysv/linux/alpha/Versions deleted file mode 100644 index d102772482..0000000000 --- a/linuxthreads/sysdeps/unix/sysv/linux/alpha/Versions +++ /dev/null @@ -1,6 +0,0 @@ -libpthread { - GLIBC_2.3.3 { - # Changed PTHREAD_STACK_MIN. - pthread_attr_setstack; pthread_attr_setstacksize; - } -} diff --git a/linuxthreads/sysdeps/unix/sysv/linux/alpha/aio_cancel.c b/linuxthreads/sysdeps/unix/sysv/linux/alpha/aio_cancel.c deleted file mode 100644 index 0d6da82919..0000000000 --- a/linuxthreads/sysdeps/unix/sysv/linux/alpha/aio_cancel.c +++ /dev/null @@ -1,33 +0,0 @@ -#include - -#define aio_cancel64 XXX -#include -#undef aio_cancel64 -#include - -extern __typeof (aio_cancel) __new_aio_cancel; -extern __typeof (aio_cancel) __old_aio_cancel; - -#define aio_cancel __new_aio_cancel - -#include - -#undef aio_cancel -strong_alias (__new_aio_cancel, __new_aio_cancel64); -versioned_symbol (librt, __new_aio_cancel, aio_cancel, GLIBC_2_3); -versioned_symbol (librt, __new_aio_cancel64, aio_cancel64, GLIBC_2_3); - -#if SHLIB_COMPAT (librt, GLIBC_2_1, GLIBC_2_3) - -#undef ECANCELED -#define aio_cancel __old_aio_cancel -#define ECANCELED 125 - -#include - -#undef aio_cancel -strong_alias (__old_aio_cancel, __old_aio_cancel64); -compat_symbol (librt, __old_aio_cancel, aio_cancel, GLIBC_2_1); -compat_symbol (librt, __old_aio_cancel64, aio_cancel64, GLIBC_2_1); - -#endif diff --git a/linuxthreads/sysdeps/unix/sysv/linux/alpha/bits/local_lim.h b/linuxthreads/sysdeps/unix/sysv/linux/alpha/bits/local_lim.h deleted file mode 100644 index 96893c59da..0000000000 --- a/linuxthreads/sysdeps/unix/sysv/linux/alpha/bits/local_lim.h +++ /dev/null @@ -1,92 +0,0 @@ -/* 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 - -/* 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 24576 - -/* 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/linuxthreads/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h b/linuxthreads/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h deleted file mode 100644 index a2724885e2..0000000000 --- a/linuxthreads/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h +++ /dev/null @@ -1,66 +0,0 @@ -/* bits/typesizes.h -- underlying types for *_t. Linux/Alpha version. - Copyright (C) 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. */ - -#ifndef _BITS_TYPES_H -# error "Never include directly; use instead." -#endif - -#ifndef _BITS_TYPESIZES_H -#define _BITS_TYPESIZES_H 1 - -/* See for the meaning of these macros. This file exists so - that need not vary across different GNU platforms. */ - -#define __DEV_T_TYPE __U64_TYPE -#define __UID_T_TYPE __U32_TYPE -#define __GID_T_TYPE __U32_TYPE -#define __INO_T_TYPE __U32_TYPE -#define __INO64_T_TYPE __U64_TYPE -#define __MODE_T_TYPE __U32_TYPE -#define __NLINK_T_TYPE __U32_TYPE -#define __OFF_T_TYPE __SLONGWORD_TYPE -#define __OFF64_T_TYPE __S64_TYPE -#define __PID_T_TYPE __S32_TYPE -#define __RLIM_T_TYPE __ULONGWORD_TYPE -#define __RLIM64_T_TYPE __U64_TYPE -#define __BLKCNT_T_TYPE __U32_TYPE -#define __BLKCNT64_T_TYPE __U64_TYPE -#define __FSBLKCNT_T_TYPE __S32_TYPE -#define __FSBLKCNT64_T_TYPE __S64_TYPE -#define __FSFILCNT_T_TYPE __U32_TYPE -#define __FSFILCNT64_T_TYPE __U64_TYPE -#define __ID_T_TYPE __U32_TYPE -#define __CLOCK_T_TYPE __SLONGWORD_TYPE -#define __TIME_T_TYPE __SLONGWORD_TYPE -#define __USECONDS_T_TYPE __U32_TYPE -#define __SUSECONDS_T_TYPE __S64_TYPE -#define __DADDR_T_TYPE __S32_TYPE -#define __SWBLK_T_TYPE __SLONGWORD_TYPE -#define __KEY_T_TYPE __S32_TYPE -#define __CLOCKID_T_TYPE __S32_TYPE -#define __TIMER_T_TYPE __S32_TYPE -#define __BLKSIZE_T_TYPE __U32_TYPE -#define __FSID_T_TYPE struct { int __val[2]; } -#define __SSIZE_T_TYPE __SWORD_TYPE - -/* Number of descriptors that can fit in an `fd_set'. */ -#define __FD_SETSIZE 1024 - - -#endif /* bits/typesizes.h */ diff --git a/linuxthreads/sysdeps/unix/sysv/linux/alpha/pt-sigsuspend.S b/linuxthreads/sysdeps/unix/sysv/linux/alpha/pt-sigsuspend.S deleted file mode 100644 index 91e5c86782..0000000000 --- a/linuxthreads/sysdeps/unix/sysv/linux/alpha/pt-sigsuspend.S +++ /dev/null @@ -1,28 +0,0 @@ -/* Internal sigsuspend system call for LinuxThreads. Alpha 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 - -#undef PSEUDO_PREPARE_ARGS -#define PSEUDO_PREPARE_ARGS ldq a0, 0(a0); - - .hidden __pthread_sigsuspend -PSEUDO_NOERRNO(__pthread_sigsuspend, sigsuspend, 1) - ret -PSEUDO_END_NOERRNO(__pthread_sigsuspend) diff --git a/linuxthreads/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h b/linuxthreads/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h deleted file mode 100644 index 9ea779e0d5..0000000000 --- a/linuxthreads/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h +++ /dev/null @@ -1,146 +0,0 @@ -/* 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 -#ifndef __ASSEMBLER__ -# include -#endif - -#if !defined NOT_IN_libc || defined IS_IN_libpthread - -# ifdef PROF -# define PSEUDO_PROF \ - .set noat; \ - lda AT, _mcount; \ - jsr AT, (AT), _mcount; \ - .set at -# else -# define PSEUDO_PROF -# endif - -/* ??? Assumes that nothing comes between PSEUDO and PSEUDO_END - besides "ret". */ - -# undef PSEUDO -# define PSEUDO(name, syscall_name, args) \ - .globl name; \ - .align 4; \ - .type name, @function; \ - .usepv name, std; \ - cfi_startproc; \ -__LABEL(name) \ - ldgp gp, 0(pv); \ - PSEUDO_PROF; \ - PSEUDO_PREPARE_ARGS \ - SINGLE_THREAD_P(t0); \ - bne t0, $pseudo_cancel; \ - lda v0, SYS_ify(syscall_name); \ - call_pal PAL_callsys; \ - bne a3, SYSCALL_ERROR_LABEL; \ -__LABEL($pseudo_ret) \ - .subsection 2; \ -__LABEL($pseudo_cancel) \ - subq sp, 64, sp; \ - cfi_def_cfa_offset(64); \ - stq ra, 0(sp); \ - cfi_offset(ra, -64); \ - SAVE_ARGS_##args; \ - CENABLE; \ - LOAD_ARGS_##args; \ - lda v0, SYS_ify(syscall_name); \ - call_pal PAL_callsys; \ - stq v0, 8(sp); \ - bne a3, $multi_error; \ - CDISABLE; \ - ldq ra, 0(sp); \ - ldq v0, 8(sp); \ - addq sp, 64, sp; \ - cfi_remember_state; \ - cfi_restore(ra); \ - cfi_def_cfa_offset(0); \ - ret; \ - cfi_restore_state; \ -__LABEL($multi_error) \ - CDISABLE; \ - ldq ra, 0(sp); \ - ldq v0, 8(sp); \ - addq sp, 64, sp; \ - cfi_restore(ra); \ - cfi_def_cfa_offset(0); \ -__LABEL($syscall_error) \ - SYSCALL_ERROR_HANDLER; \ - .previous - -# undef PSEUDO_END -# define PSEUDO_END(sym) \ - .subsection 2; \ - cfi_endproc; \ - .size sym, .-sym - -# define SAVE_ARGS_0 /* Nothing. */ -# define SAVE_ARGS_1 SAVE_ARGS_0; stq a0, 8(sp) -# define SAVE_ARGS_2 SAVE_ARGS_1; stq a1, 16(sp) -# define SAVE_ARGS_3 SAVE_ARGS_2; stq a2, 24(sp) -# define SAVE_ARGS_4 SAVE_ARGS_3; stq a3, 32(sp) -# define SAVE_ARGS_5 SAVE_ARGS_4; stq a4, 40(sp) -# define SAVE_ARGS_6 SAVE_ARGS_5; stq a5, 48(sp) - -# define LOAD_ARGS_0 /* Nothing. */ -# define LOAD_ARGS_1 LOAD_ARGS_0; ldq a0, 8(sp) -# define LOAD_ARGS_2 LOAD_ARGS_1; ldq a1, 16(sp) -# define LOAD_ARGS_3 LOAD_ARGS_2; ldq a2, 24(sp) -# define LOAD_ARGS_4 LOAD_ARGS_3; ldq a3, 32(sp) -# define LOAD_ARGS_5 LOAD_ARGS_4; ldq a4, 40(sp) -# define LOAD_ARGS_6 LOAD_ARGS_5; ldq a5, 48(sp) - -# ifdef IS_IN_libpthread -# define __local_enable_asynccancel __pthread_enable_asynccancel -# define __local_disable_asynccancel __pthread_disable_asynccancel -# define __local_multiple_threads __pthread_multiple_threads -# else -# define __local_enable_asynccancel __libc_enable_asynccancel -# define __local_disable_asynccancel __libc_disable_asynccancel -# define __local_multiple_threads __libc_multiple_threads -# endif - -# ifdef PIC -# define CENABLE bsr ra, __local_enable_asynccancel !samegp -# define CDISABLE bsr ra, __local_disable_asynccancel !samegp -# else -# define CENABLE jsr ra, __local_enable_asynccancel; ldgp ra, 0(gp) -# define CDISABLE jsr ra, __local_disable_asynccancel; ldgp ra, 0(gp) -# endif - -# ifndef __ASSEMBLER__ -extern int __local_multiple_threads attribute_hidden; -# define SINGLE_THREAD_P \ - __builtin_expect (__local_multiple_threads == 0, 1) -# elif defined(PIC) -# define SINGLE_THREAD_P(reg) ldl reg, __local_multiple_threads(gp) !gprel -# else -# define SINGLE_THREAD_P(reg) \ - ldah reg, __local_multiple_threads(gp) !gprelhigh; \ - ldl reg, __local_multiple_threads(reg) !gprellow -# endif - -#elif !defined __ASSEMBLER__ - -/* This code should never be used but we define it anyhow. */ -# define SINGLE_THREAD_P (1) - -#endif diff --git a/linuxthreads/sysdeps/unix/sysv/linux/alpha/vfork.S b/linuxthreads/sysdeps/unix/sysv/linux/alpha/vfork.S deleted file mode 100644 index cfaae10606..0000000000 --- a/linuxthreads/sysdeps/unix/sysv/linux/alpha/vfork.S +++ /dev/null @@ -1,70 +0,0 @@ -/* 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 - - .align 4 - .globl __vfork - .type __vfork, @function - .usepv __vfork, std - cfi_startproc -__vfork: - ldgp gp, 0(pv) - PSEUDO_PROF - -#ifdef SHARED - ldq t0, __libc_pthread_functions(gp) !gprel - bne t0, HIDDEN_JUMPTARGET (__fork) !samegp -#else - .weak pthread_create - ldq t0, pthread_create(gp) !literal - bne t0, $do_fork -#endif - - lda v0, SYS_ify(vfork) - call_pal PAL_callsys - bne a3, SYSCALL_ERROR_LABEL - ret - -#ifndef SHARED - /* Can't tail-call due to possible mismatch between GP in - fork and vfork object files. */ -$do_fork: - subq sp, 16, sp - cfi_adjust_cfa_offset(16) - stq ra, 0(sp) - cfi_offset(ra, -16) - jsr ra, HIDDEN_JUMPTARGET (__fork) - ldgp gp, 0(ra) - ldq ra, 0(sp) - addq sp, 16, sp - cfi_restore(ra) - cfi_adjust_cfa_offset(-16) - ret - -$syscall_error: - SYSCALL_ERROR_HANDLER -#endif - - cfi_endproc - .size __vfork, .-__vfork - -libc_hidden_def (__vfork) - -weak_alias (__vfork, vfork) diff --git a/linuxthreads/sysdeps/unix/sysv/linux/arm/sysdep-cancel.h b/linuxthreads/sysdeps/unix/sysv/linux/arm/sysdep-cancel.h deleted file mode 100644 index 019bd54913..0000000000 --- a/linuxthreads/sysdeps/unix/sysv/linux/arm/sysdep-cancel.h +++ /dev/null @@ -1,145 +0,0 @@ -/* Copyright (C) 2003 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Phil Blundell , 2003. - - 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 -#ifndef __ASSEMBLER__ -# include -#endif - -#if !defined NOT_IN_libc || defined IS_IN_libpthread - -/* We push lr onto the stack, so we have to use ldmib instead of ldmia - to find the saved arguments. */ -# ifdef PIC -# undef DOARGS_5 -# undef DOARGS_6 -# undef DOARGS_7 -# define DOARGS_5 str r4, [sp, $-4]!; ldr r4, [sp, $8]; -# define DOARGS_6 mov ip, sp; stmfd sp!, {r4, r5}; ldmib ip, {r4, r5}; -# define DOARGS_7 mov ip, sp; stmfd sp!, {r4, r5, r6}; ldmib ip, {r4, r5, r6}; -# endif - -# undef PSEUDO_RET -# define PSEUDO_RET \ - ldrcc pc, [sp], $4; \ - ldr lr, [sp], $4; \ - b PLTJMP(SYSCALL_ERROR) - -# undef PSEUDO -# define PSEUDO(name, syscall_name, args) \ - .section ".text"; \ - PSEUDO_PROLOGUE; \ - ENTRY (name); \ - SINGLE_THREAD_P_INT; \ - bne .Lpseudo_cancel; \ - DO_CALL (syscall_name, args); \ - cmn r0, $4096; \ - PSEUDO_RET_MOV; \ - .Lpseudo_cancel: \ - MAYBE_SAVE_LR; \ - DOCARGS_##args; /* save syscall args around CENABLE. */ \ - CENABLE; \ - mov ip, r0; /* put mask in safe place. */ \ - UNDOCARGS_##args; /* restore syscall args. */ \ - swi SYS_ify (syscall_name); /* do the call. */ \ - str r0, [sp, $-4]!; /* save syscall return value. */ \ - mov r0, ip; /* get mask back. */ \ - CDISABLE; \ - ldr r0, [sp], $4; /* retrieve return value. */ \ - UNDOC2ARGS_##args; /* fix register damage. */ \ - cmn r0, $4096; - -# define DOCARGS_0 -# define UNDOCARGS_0 -# define UNDOC2ARGS_0 - -# define DOCARGS_1 str r0, [sp, #-4]!; -# define UNDOCARGS_1 ldr r0, [sp], #4; -# define UNDOC2ARGS_1 - -# define DOCARGS_2 str r1, [sp, #-4]!; str r0, [sp, #-4]!; -# define UNDOCARGS_2 ldr r0, [sp], #4; ldr r1, [sp], #4; -# define UNDOC2ARGS_2 - -# define DOCARGS_3 str r2, [sp, #-4]!; str r1, [sp, #-4]!; str r0, [sp, #-4]!; -# define UNDOCARGS_3 ldr r0, [sp], #4; ldr r1, [sp], #4; ldr r2, [sp], #4 -# define UNDOC2ARGS_3 - -# define DOCARGS_4 stmfd sp!, {r0-r3} -# define UNDOCARGS_4 ldmfd sp!, {r0-r3} -# define UNDOC2ARGS_4 - -# define DOCARGS_5 stmfd sp!, {r0-r3} -# define UNDOCARGS_5 ldmfd sp, {r0-r3}; str r4, [sp, #-4]!; ldr r4, [sp, #24] -# define UNDOC2ARGS_5 ldr r4, [sp], #20 - -# ifdef IS_IN_libpthread -# define CENABLE bl PLTJMP(__pthread_enable_asynccancel) -# define CDISABLE bl PLTJMP(__pthread_disable_asynccancel) -# define __local_multiple_threads __pthread_multiple_threads -# else -# define CENABLE bl PLTJMP(__libc_enable_asynccancel) -# define CDISABLE bl PLTJMP(__libc_disable_asynccancel) -# define __local_multiple_threads __libc_multiple_threads -# endif - -# ifndef __ASSEMBLER__ -extern int __local_multiple_threads attribute_hidden; -# define SINGLE_THREAD_P __builtin_expect (__local_multiple_threads == 0, 1) -# else -# if !defined PIC -# define SINGLE_THREAD_P_INT \ - ldr ip, =__local_multiple_threads; \ - ldr ip, [ip]; \ - teq ip, #0; -# define SINGLE_THREAD_P SINGLE_THREAD_P_INT -# define MAYBE_SAVE_LR \ - str lr, [sp, $-4]!; -# define PSEUDO_RET_MOV \ - RETINSTR(cc, lr); \ - b PLTJMP(SYSCALL_ERROR) -# define PSEUDO_PROLOGUE -# else -# define SINGLE_THREAD_P_PIC(reg) \ - ldr ip, 1b; \ - ldr reg, 2b; \ -3: \ - add ip, pc, ip; \ - ldr ip, [ip, reg]; \ - teq ip, #0; -# define SINGLE_THREAD_P_INT \ - str lr, [sp, $-4]!; \ - SINGLE_THREAD_P_PIC(lr) -# define SINGLE_THREAD_P \ - SINGLE_THREAD_P_INT; \ - ldr lr, [sp], $4 -# define PSEUDO_PROLOGUE \ - 1: .word _GLOBAL_OFFSET_TABLE_ - 3f - 8; \ - 2: .word __local_multiple_threads(GOTOFF); -# define MAYBE_SAVE_LR /* lr already saved */ -# define PSEUDO_RET_MOV PSEUDO_RET -# endif -# endif - -#elif !defined __ASSEMBLER__ - -/* This code should never be used but we define it anyhow. */ -# define SINGLE_THREAD_P (1) - -#endif diff --git a/linuxthreads/sysdeps/unix/sysv/linux/arm/vfork.S b/linuxthreads/sysdeps/unix/sysv/linux/arm/vfork.S deleted file mode 100644 index 2708c701eb..0000000000 --- a/linuxthreads/sysdeps/unix/sysv/linux/arm/vfork.S +++ /dev/null @@ -1,80 +0,0 @@ -/* Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Philip Blundell . - - 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 -#define _ERRNO_H 1 -#include -#include - -/* Clone the calling process, but without copying the whole address space. - The calling process is suspended until the new process exits or is - replaced by a call to `execve'. Return -1 for errors, 0 to the new process, - and the process ID of the new process to the old process. */ - - PSEUDO_PROLOGUE - -ENTRY (__vfork) - -#ifdef __NR_vfork - -#ifdef SHARED - ldr ip, 1f - ldr r0, 2f -3: add ip, pc, ip - ldr r0, [ip, r0] -#else - ldr r0, 1f -#endif - movs r0, r0 - bne HIDDEN_JUMPTARGET (__fork) - - swi __NR_vfork - cmn a1, #4096 - RETINSTR(cc, lr) - -#ifndef __ASSUME_VFORK_SYSCALL - /* Check if vfork syscall is known at all. */ - cmn a1, #ENOSYS - bne PLTJMP(C_SYMBOL_NAME(__syscall_error)) -#endif - -#endif - -#ifndef __ASSUME_VFORK_SYSCALL - /* If we don't have vfork, fork is close enough. */ - swi __NR_fork - cmn a1, #4096 - RETINSTR(cc, lr) -#elif !defined __NR_vfork -# error "__NR_vfork not available and __ASSUME_VFORK_SYSCALL defined" -#endif - b PLTJMP(C_SYMBOL_NAME(__syscall_error)) - -#ifdef SHARED -1: .word _GLOBAL_OFFSET_TABLE_ - 3b - 8 -2: .word __libc_pthread_functions(GOTOFF) -#else - .weak pthread_create -1: .word pthread_create -#endif - -PSEUDO_END (__vfork) -libc_hidden_def (__vfork) - -weak_alias (__vfork, vfork) diff --git a/linuxthreads/sysdeps/unix/sysv/linux/bits/local_lim.h b/linuxthreads/sysdeps/unix/sysv/linux/bits/local_lim.h deleted file mode 100644 index ed6c3c589b..0000000000 --- a/linuxthreads/sysdeps/unix/sysv/linux/bits/local_lim.h +++ /dev/null @@ -1,92 +0,0 @@ -/* Minimum guaranteed maximum values for system limits. Linux 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 - -/* 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 16384 - -/* 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/linuxthreads/sysdeps/unix/sysv/linux/bits/posix_opt.h b/linuxthreads/sysdeps/unix/sysv/linux/bits/posix_opt.h deleted file mode 100644 index 71b7e74649..0000000000 --- a/linuxthreads/sysdeps/unix/sysv/linux/bits/posix_opt.h +++ /dev/null @@ -1,181 +0,0 @@ -/* Define POSIX options for Linux. - Copyright (C) 1996-2001, 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. */ - -#ifndef _POSIX_OPT_H -#define _POSIX_OPT_H 1 - -/* Job control is supported. */ -#define _POSIX_JOB_CONTROL 1 - -/* Processes have a saved set-user-ID and a saved set-group-ID. */ -#define _POSIX_SAVED_IDS 1 - -/* Priority scheduling is supported. */ -#define _POSIX_PRIORITY_SCHEDULING 200112L - -/* Synchronizing file data is supported. */ -#define _POSIX_SYNCHRONIZED_IO 200112L - -/* The fsync function is present. */ -#define _POSIX_FSYNC 200112L - -/* Mapping of files to memory is supported. */ -#define _POSIX_MAPPED_FILES 200112L - -/* Locking of all memory is supported. */ -#define _POSIX_MEMLOCK 200112L - -/* Locking of ranges of memory is supported. */ -#define _POSIX_MEMLOCK_RANGE 200112L - -/* Setting of memory protections is supported. */ -#define _POSIX_MEMORY_PROTECTION 200112L - -/* Only root can change owner of file. */ -#define _POSIX_CHOWN_RESTRICTED 1 - -/* `c_cc' member of 'struct termios' structure can be disabled by - using the value _POSIX_VDISABLE. */ -#define _POSIX_VDISABLE '\0' - -/* Filenames are not silently truncated. */ -#define _POSIX_NO_TRUNC 1 - -/* X/Open realtime support is available. */ -#define _XOPEN_REALTIME 1 - -/* X/Open realtime thread support is available. */ -#define _XOPEN_REALTIME_THREADS 1 - -/* XPG4.2 shared memory is supported. */ -#define _XOPEN_SHM 1 - -/* Tell we have POSIX threads. */ -#define _POSIX_THREADS 200112L - -/* We have the reentrant functions described in POSIX. */ -#define _POSIX_REENTRANT_FUNCTIONS 1 -#define _POSIX_THREAD_SAFE_FUNCTIONS 200112L - -/* We provide priority scheduling for threads. */ -#define _POSIX_THREAD_PRIORITY_SCHEDULING 200112L - -/* We support user-defined stack sizes. */ -#define _POSIX_THREAD_ATTR_STACKSIZE 200112L - -/* We support user-defined stacks. */ -#define _POSIX_THREAD_ATTR_STACKADDR 200112L - -/* We support POSIX.1b semaphores, but only the non-shared form for now. */ -#define _POSIX_SEMAPHORES 200112L - -/* Real-time signals are supported. */ -#define _POSIX_REALTIME_SIGNALS 200112L - -/* We support asynchronous I/O. */ -#define _POSIX_ASYNCHRONOUS_IO 200112L -#define _POSIX_ASYNC_IO 1 -/* Alternative name for Unix98. */ -#define _LFS_ASYNCHRONOUS_IO 1 -/* Support for prioritization is also available. */ -#define _POSIX_PRIORITIZED_IO 200112L - -/* The LFS support in asynchronous I/O is also available. */ -#define _LFS64_ASYNCHRONOUS_IO 1 - -/* The rest of the LFS is also available. */ -#define _LFS_LARGEFILE 1 -#define _LFS64_LARGEFILE 1 -#define _LFS64_STDIO 1 - -/* POSIX shared memory objects are implemented. */ -#define _POSIX_SHARED_MEMORY_OBJECTS 200112L - -/* CPU-time clocks support needs to be checked at runtime. */ -#define _POSIX_CPUTIME 0 - -/* Clock support in threads must be also checked at runtime. */ -#define _POSIX_THREAD_CPUTIME 0 - -/* GNU libc provides regular expression handling. */ -#define _POSIX_REGEXP 1 - -/* Reader/Writer locks are available. */ -#define _POSIX_READER_WRITER_LOCKS 200112L - -/* We have a POSIX shell. */ -#define _POSIX_SHELL 1 - -/* We support the Timeouts option. */ -#define _POSIX_TIMEOUTS 200112L - -/* We support spinlocks. */ -#define _POSIX_SPIN_LOCKS 200112L - -/* The `spawn' function family is supported. */ -#define _POSIX_SPAWN 200112L - -/* We have POSIX timers. */ -#define _POSIX_TIMERS 200112L - -/* The barrier functions are available. */ -#define _POSIX_BARRIERS 200112L - -/* POSIX message queues are available. */ -#define _POSIX_MESSAGE_PASSING 200112L - -/* Thread process-shared synchronization is not supported. */ -#define _POSIX_THREAD_PROCESS_SHARED -1 - -/* The monotonic clock might be available. */ -#define _POSIX_MONOTONIC_CLOCK 0 - -/* The clock selection interfaces are not available. */ -#define _POSIX_CLOCK_SELECTION -1 - -/* Advisory information interfaces are available. */ -#define _POSIX_ADVISORY_INFO 200112L - -/* IPv6 support is available. */ -#define _POSIX_IPV6 200112L - -/* Raw socket support is available. */ -#define _POSIX_RAW_SOCKETS 200112L - -/* We have at least one terminal. */ -#define _POSIX2_CHAR_TERM 200112L - -/* Neither process nor thread sporadic server interfaces is available. */ -#define _POSIX_SPORADIC_SERVER -1 -#define _POSIX_THREAD_SPORADIC_SERVER -1 - -/* trace.h is not available. */ -#define _POSIX_TRACE -1 -#define _POSIX_TRACE_EVENT_FILTER -1 -#define _POSIX_TRACE_INHERIT -1 -#define _POSIX_TRACE_LOG -1 - -/* Typed memory objects are not available. */ -#define _POSIX_TYPED_MEMORY_OBJECTS -1 - -/* No support for priority inheritance or protection. */ -#define _POSIX_THREAD_PRIO_INHERIT -1 -#define _POSIX_THREAD_PRIO_PROTECT -1 - -#endif /* posix_opt.h */ diff --git a/linuxthreads/sysdeps/unix/sysv/linux/bits/sigthread.h b/linuxthreads/sysdeps/unix/sysv/linux/bits/sigthread.h deleted file mode 100644 index 960bde18a9..0000000000 --- a/linuxthreads/sysdeps/unix/sysv/linux/bits/sigthread.h +++ /dev/null @@ -1,38 +0,0 @@ -/* Signal handling function for threaded programs. - Copyright (C) 1998, 1999, 2000, 2002 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. */ - -#ifndef _BITS_SIGTHREAD_H -#define _BITS_SIGTHREAD_H 1 - -#if !defined _SIGNAL_H && !defined _PTHREAD_H -# error "Never include this file directly. Use instead" -#endif - -/* Functions for handling signals. */ - -/* Modify the signal mask for the calling thread. The arguments have - the same meaning as for sigprocmask(2). */ -extern int pthread_sigmask (int __how, - __const __sigset_t *__restrict __newmask, - __sigset_t *__restrict __oldmask)__THROW; - -/* Send signal SIGNO to the given thread. */ -extern int pthread_kill (pthread_t __threadid, int __signo) __THROW; - -#endif /* bits/sigthread.h */ diff --git a/linuxthreads/sysdeps/unix/sysv/linux/execve.c b/linuxthreads/sysdeps/unix/sysv/linux/execve.c deleted file mode 100644 index 9fa912b90d..0000000000 --- a/linuxthreads/sysdeps/unix/sysv/linux/execve.c +++ /dev/null @@ -1,73 +0,0 @@ -/* Copyright (C) 1999, 2000, 2002 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 -#include - -#include -#include -#include -#include - -extern int __syscall_execve (const char *__unbounded file, - char *__unbounded const *__unbounded argv, - char *__unbounded const *__unbounded envp); -extern void __pthread_kill_other_threads_np (void); -weak_extern (__pthread_kill_other_threads_np) - - -int -__execve (file, argv, envp) - const char *file; - char *const argv[]; - char *const envp[]; -{ - /* If this is a threaded application kill all other threads. */ - if (__pthread_kill_other_threads_np) - __pthread_kill_other_threads_np (); -#if __BOUNDED_POINTERS__ - { - char *const *v; - int i; - char *__unbounded *__unbounded ubp_argv; - char *__unbounded *__unbounded ubp_envp; - char *__unbounded *__unbounded ubp_v; - - for (v = argv; *v; v++) - ; - i = v - argv + 1; - ubp_argv = (char *__unbounded *__unbounded) alloca (sizeof (*ubp_argv) * i); - for (v = argv, ubp_v = ubp_argv; --i; v++, ubp_v++) - *ubp_v = CHECK_STRING (*v); - *ubp_v = 0; - - for (v = envp; *v; v++) - ; - i = v - envp + 1; - ubp_envp = (char *__unbounded *__unbounded) alloca (sizeof (*ubp_envp) * i); - for (v = envp, ubp_v = ubp_envp; --i; v++, ubp_v++) - *ubp_v = CHECK_STRING (*v); - *ubp_v = 0; - - return INLINE_SYSCALL (execve, 3, CHECK_STRING (file), ubp_argv, ubp_envp); - } -#else - return INLINE_SYSCALL (execve, 3, file, argv, envp); -#endif -} -weak_alias (__execve, execve) diff --git a/linuxthreads/sysdeps/unix/sysv/linux/fork.c b/linuxthreads/sysdeps/unix/sysv/linux/fork.c deleted file mode 100644 index 00eb787093..0000000000 --- a/linuxthreads/sysdeps/unix/sysv/linux/fork.c +++ /dev/null @@ -1,43 +0,0 @@ -/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Jakub Jelinek , 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 -#include -#include - -#ifndef SHARED -weak_extern (__pthread_fork); -#endif - -struct fork_block __fork_block = -{ - .lock = PTHREAD_MUTEX_INITIALIZER, - .prepare_list = { &__fork_block.prepare_list, &__fork_block.prepare_list }, - .parent_list = { &__fork_block.parent_list, &__fork_block.parent_list }, - .child_list = { &__fork_block.child_list, &__fork_block.child_list } -}; - -pid_t -__libc_fork (void) -{ - return __libc_maybe_call2 (pthread_fork, (&__fork_block), ARCH_FORK ()); -} -weak_alias (__libc_fork, __fork) -libc_hidden_def (__fork) -weak_alias (__libc_fork, fork) diff --git a/linuxthreads/sysdeps/unix/sysv/linux/fork.h b/linuxthreads/sysdeps/unix/sysv/linux/fork.h deleted file mode 100644 index 76708e3e39..0000000000 --- a/linuxthreads/sysdeps/unix/sysv/linux/fork.h +++ /dev/null @@ -1,60 +0,0 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 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 -#include -#include - -struct fork_block -{ - /* Lock to protect handling of fork handlers. */ - __libc_lock_define (, lock); - - /* Lists of registered fork handlers. */ - list_t prepare_list; - list_t parent_list; - list_t child_list; -}; - -extern struct fork_block __fork_block attribute_hidden; - -/* Elements of the fork handler lists. */ -struct fork_handler -{ - list_t list; - void (*handler) (void); - void *dso_handle; -}; - - -/* Function to call to unregister fork handlers. */ -extern void __unregister_atfork (void *dso_handle) attribute_hidden; -#define UNREGISTER_ATFORK(dso_handle) __unregister_atfork (dso_handle) - - -/* C library side function to register new fork handlers. */ -extern int __register_atfork (void (*__prepare) (void), - void (*__parent) (void), - void (*__child) (void), - void *dso_handle); -libc_hidden_proto (__register_atfork) - -#ifndef ARCH_FORK -# define ARCH_FORK() INLINE_SYSCALL (fork, 0) -#endif diff --git a/linuxthreads/sysdeps/unix/sysv/linux/hppa/aio_cancel.c b/linuxthreads/sysdeps/unix/sysv/linux/hppa/aio_cancel.c deleted file mode 100644 index 0d6da82919..0000000000 --- a/linuxthreads/sysdeps/unix/sysv/linux/hppa/aio_cancel.c +++ /dev/null @@ -1,33 +0,0 @@ -#include - -#define aio_cancel64 XXX -#include -#undef aio_cancel64 -#include - -extern __typeof (aio_cancel) __new_aio_cancel; -extern __typeof (aio_cancel) __old_aio_cancel; - -#define aio_cancel __new_aio_cancel - -#include - -#undef aio_cancel -strong_alias (__new_aio_cancel, __new_aio_cancel64); -versioned_symbol (librt, __new_aio_cancel, aio_cancel, GLIBC_2_3); -versioned_symbol (librt, __new_aio_cancel64, aio_cancel64, GLIBC_2_3); - -#if SHLIB_COMPAT (librt, GLIBC_2_1, GLIBC_2_3) - -#undef ECANCELED -#define aio_cancel __old_aio_cancel -#define ECANCELED 125 - -#include - -#undef aio_cancel -strong_alias (__old_aio_cancel, __old_aio_cancel64); -compat_symbol (librt, __old_aio_cancel, aio_cancel, GLIBC_2_1); -compat_symbol (librt, __old_aio_cancel64, aio_cancel64, GLIBC_2_1); - -#endif diff --git a/linuxthreads/sysdeps/unix/sysv/linux/hppa/bits/initspin.h b/linuxthreads/sysdeps/unix/sysv/linux/hppa/bits/initspin.h deleted file mode 100644 index 9b13400286..0000000000 --- a/linuxthreads/sysdeps/unix/sysv/linux/hppa/bits/initspin.h +++ /dev/null @@ -1,27 +0,0 @@ -/* PA-RISC specific definitions for spinlock initializers. - Copyright (C) 2000, 2001 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. */ - -/* Initial value of a spinlock. PA-RISC only implements atomic load - and clear so this must be non-zero. */ -#define __LT_SPINLOCK_INIT 1 - -/* Macros for lock initializers, using the above definition. */ -#define __LOCK_INITIALIZER { 0, __LT_SPINLOCK_INIT } -#define __ALT_LOCK_INITIALIZER { 0, __LT_SPINLOCK_INIT } -#define __ATOMIC_INITIALIZER { 0, __LT_SPINLOCK_INIT } diff --git a/linuxthreads/sysdeps/unix/sysv/linux/hppa/malloc-machine.h b/linuxthreads/sysdeps/unix/sysv/linux/hppa/malloc-machine.h deleted file mode 100644 index 817cf59222..0000000000 --- a/linuxthreads/sysdeps/unix/sysv/linux/hppa/malloc-machine.h +++ /dev/null @@ -1,73 +0,0 @@ -/* HP-PARISC macro definitions for mutexes, thread-specific data - and parameters for malloc. - Copyright (C) 2003 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Carlos O'Donell , 2003. - - 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. */ - -#ifndef _MALLOC_MACHINE_H -#define _MALLOC_MACHINE_H - -#undef thread_atfork_static - -#include -#include - -__libc_lock_define (typedef, mutex_t) - -/* Since our lock structure does not tolerate being initialized to zero, we must - modify the standard function calls made by malloc */ -# define mutex_init(m) \ - __libc_maybe_call (__pthread_mutex_init, (m, NULL), \ - (((m)->__m_lock.__spinlock = __LT_SPINLOCK_INIT),(*(int *)(m))) ) -# define mutex_lock(m) \ - __libc_maybe_call (__pthread_mutex_lock, (m), \ - (__load_and_clear(&((m)->__m_lock.__spinlock)), 0)) -# define mutex_trylock(m) \ - __libc_maybe_call (__pthread_mutex_trylock, (m), \ - (*(int *)(m) ? 1 : (__load_and_clear(&((m)->__m_lock.__spinlock)), 0))) -# define mutex_unlock(m) \ - __libc_maybe_call (__pthread_mutex_unlock, (m), \ - (((m)->__m_lock.__spinlock = __LT_SPINLOCK_INIT), (*(int *)(m))) ) - -/* This is defined by newer gcc version unique for each module. */ -extern void *__dso_handle __attribute__ ((__weak__)); - -#include - -#ifdef SHARED -# define thread_atfork(prepare, parent, child) \ - __register_atfork (prepare, parent, child, __dso_handle) -#else -# define thread_at