summaryrefslogtreecommitdiffstats
path: root/libpthread/nptl/sysdeps/unix/sysv/linux
diff options
context:
space:
mode:
Diffstat (limited to 'libpthread/nptl/sysdeps/unix/sysv/linux')
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/ia64/Makefile3
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/ia64/Versions13
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S156
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c168
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/ia64/bits/local_lim.h89
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h160
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/ia64/bits/semaphore.h39
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/ia64/clone2.S2
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/ia64/createthread.c26
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/ia64/dl-sysdep.h68
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/ia64/fork.c31
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h39
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h204
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/ia64/pt-initfini.c143
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/ia64/pt-vfork.S60
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/ia64/pthread_once.c94
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h222
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/ia64/timer_create.c1
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/ia64/timer_delete.c1
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/ia64/timer_getoverr.c1
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/ia64/timer_gettime.c1
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/ia64/timer_settime.c1
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c38
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c44
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/ia64/vfork.S69
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h195
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/s390/bits/semaphore.h43
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/s390/fork.c31
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/s390/jmp-unwind.c41
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h282
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/s390/not-cancel.h1
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/s390/pthread_once.c111
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/s390/s390-32/clone.S2
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c154
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S54
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h115
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/s390/s390-32/vfork.S57
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/s390/s390-64/Versions7
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/s390/s390-64/clone.S2
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c136
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S57
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h128
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c1
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c1
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c1
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c1
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c1
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/s390/s390-64/vfork.S59
48 files changed, 0 insertions, 3153 deletions
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/Makefile b/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/Makefile
deleted file mode 100644
index ff98f1a49..000000000
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/Makefile
+++ /dev/null
@@ -1,3 +0,0 @@
-ifeq ($(subdir),nptl)
-libpthread-sysdep_routines += __ia64_longjmp unwind_longjmp __sigstack_longjmp
-endif
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/Versions b/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/Versions
deleted file mode 100644
index 437c4da28..000000000
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/Versions
+++ /dev/null
@@ -1,13 +0,0 @@
-libpthread {
- GLIBC_2.3.3 {
- # Changed PTHREAD_STACK_MIN.
- pthread_attr_setstack; pthread_attr_setstacksize;
- }
-}
-librt {
- GLIBC_2.3.3 {
- # Changed timer_t.
- timer_create; timer_delete; timer_getoverrun; timer_gettime;
- timer_settime;
- }
-}
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S b/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S
deleted file mode 100644
index 1ceb210c2..000000000
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S
+++ /dev/null
@@ -1,156 +0,0 @@
-/* Copyright (C) 1999, 2000, 2001, 2004 Free Software Foundation, Inc.
- Contributed by David Mosberger-Tang <davidm@hpl.hp.com>.
-
- 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 <features.h>
-
-LEAF(__ia64_flush_rbs)
- flushrs
- mov r9 = ar.rsc // 12 cyc latency
- ;;
- mov r8 = ar.bsp // 12 cyc latency
- ;;
- and r16 = ~0x3, r9 // clear ar.rsc.mode
- ;;
- mov ar.rsc = r16 // put RSE into enforced-lazy mode
- ;;
- mov r10 = ar.rnat // 5 cyc latency
- ret
-END(__ia64_flush_rbs)
-
-
-# define pPos p6 /* is rotate count positive? */
-# define pNeg p7 /* is rotate count negative? */
-
-/* __ia64_longjmp(__jmp_buf buf, int val, long rnat, long rsc) */
-
-
-LEAF(__ia64_longjmp)
- alloc r8=ar.pfs,4,0,0,0
- add r2=0x98,in0 // r2 <- &jmpbuf.orig_jmp_buf_addr
- add r3=0x88,in0 // r3 <- &jmpbuf.ar_bsp
- ;;
- ld8 r8=[r2] // r8 <- orig_jmp_buf_addr
- ld8 r23=[r3],8 // r23 <- jmpbuf.ar_bsp
- mov r2=in0
- ;;
- //
- // Note: we need to redo the "flushrs" here even though it's
- // already been done by __ia64_flush_rbs. It is needed to
- // ensure that ar.bspstore == ar.bsp.
- //
- flushrs // flush dirty regs to backing store
- ld8 r25=[r3] // r25 <- jmpbuf.ar_unat
- sub r8=r8,in0 // r8 <- &orig_jmpbuf - &jmpbuf
- ;;
- add r3=8,in0 // r3 <- &jmpbuf.r1
- extr.u r8=r8,3,6 // r8 <- (&orig_jmpbuf - &jmpbuf)/8 & 0x3f
- ;;
- cmp.lt pNeg,pPos=r8,r0
- ;;
-(pPos) mov r16=r8
-(pNeg) add r16=64,r8
-(pPos) sub r17=64,r8
-(pNeg) sub r17=r0,r8
- ;;
- shr.u r8=r25,r16
- shl r9=r25,r17
- ;;
- or r25=r8,r9
- ;;
- mov ar.unat=r25 // setup ar.unat (NaT bits for r1, r4-r7, and r12)
- ;;
- ld8.fill.nta sp=[r2],16 // r12 (sp)
- ld8.fill.nta gp=[r3],16 // r1 (gp)
- dep r11=-1,r23,3,6 // r11 <- ia64_rse_rnat_addr(jmpbuf.ar_bsp)
- ;;
- ld8.nta r16=[r2],16 // caller's unat
- ld8.nta r17=[r3],16 // fpsr
- ;;
- ld8.fill.nta r4=[r2],16 // r4
- ld8.fill.nta r5=[r3],16 // r5 (gp)
- ;;
- ld8.fill.nta r6=[r2],16 // r6
- ld8.fill.nta r7=[r3],16 // r7
- ;;
- mov ar.unat=r16 // restore caller's unat
- mov ar.fpsr=r17 // restore fpsr
- ;;
- ld8.nta r16=[r2],16 // b0
- ld8.nta r17=[r3],16 // b1
- ;;
- mov ar.bspstore=r23 // restore ar.bspstore
- ld8.nta r18=[r2],16 // b2
- ;;
- mov ar.rnat=in2 // restore ar.rnat
- ld8.nta r19=[r3],16 // b3
- ;;
- ld8.nta r20=[r2],16 // b4
- ld8.nta r21=[r3],16 // b5
- ;;
- ld8.nta r11=[r2],16 // ar.pfs
- ld8.nta r22=[r3],56 // ar.lc
- ;;
- ld8.nta r24=[r2],32 // pr
- mov ar.rsc=in3 // restore ar.rsc
- mov b0=r16
- ;;
- ldf.fill.nta f2=[r2],32
- ldf.fill.nta f3=[r3],32
- mov b1=r17
- ;;
- ldf.fill.nta f4=[r2],32
- ldf.fill.nta f5=[r3],32
- mov b2=r18
- ;;
- ldf.fill.nta f16=[r2],32
- ldf.fill.nta f17=[r3],32
- mov b3=r19
- ;;
- ldf.fill.nta f18=[r2],32
- ldf.fill.nta f19=[r3],32
- mov b4=r20
- ;;
- ldf.fill.nta f20=[r2],32
- ldf.fill.nta f21=[r3],32
- mov b5=r21
- ;;
- ldf.fill.nta f22=[r2],32
- ldf.fill.nta f23=[r3],32
- mov ar.lc=r22
- ;;
- ldf.fill.nta f24=[r2],32
- ldf.fill.nta f25=[r3],32
- cmp.eq p8,p9=0,in1
- ;;
- ldf.fill.nta f26=[r2],32
- ldf.fill.nta f27=[r3],32
- mov ar.pfs=r11
- ;;
- ldf.fill.nta f28=[r2],32
- ldf.fill.nta f29=[r3],32
-(p8) mov r8=1
- ;;
- ldf.fill.nta f30=[r2]
- ldf.fill.nta f31=[r3]
-(p9) mov r8=in1
-
- invala // virt. -> phys. regnum mapping may change
- mov pr=r24,-1
- ret
-END(__ia64_longjmp)
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c b/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c
deleted file mode 100644
index 8f552eaad..000000000
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c
+++ /dev/null
@@ -1,168 +0,0 @@
-/* Copyright (C) 2004 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by David Mosberger-Tang <davidm@hpl.hp.com>.
-
- 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. */
-
-/* The public __longjmp() implementation is limited to jumping within
- the same stack. That is, in general it is not possible to use this
- __longjmp() implementation to cross from one stack to another.
- In constrast, the __sigstack_longjmp() implemented here allows
- crossing from the alternate signal stack to the normal stack
- as a special case. */
-
-#include <assert.h>
-#include <setjmp.h>
-#include <signal.h>
-#include <stdint.h>
-#include <stdlib.h>
-
-#include <sysdep.h>
-#include <sys/rse.h>
-
-#define JB_SP 0
-#define JB_BSP 17
-
-struct rbs_flush_values
- {
- unsigned long bsp;
- unsigned long rsc;
- unsigned long rnat;
- };
-
-extern struct rbs_flush_values __ia64_flush_rbs (void);
-extern void __ia64_longjmp (__jmp_buf buf, int val, long rnat, long rsc)
- __attribute__ ((__noreturn__));
-
-static void
-copy_rbs (unsigned long *dst, unsigned long *dst_end, unsigned long dst_rnat,
- unsigned long *src, unsigned long *src_end,
- unsigned long current_rnat)
-{
- unsigned long dst_slot, src_rnat = 0, src_slot, *src_rnat_addr, nat_bit;
- int first_time = 1;
-
- while (dst < dst_end)
- {
- dst_slot = ia64_rse_slot_num (dst);
- if (dst_slot == 63)
- {
- *dst++ = dst_rnat;
- dst_rnat = 0;
- }
- else
- {
- /* read source value, including NaT bit: */
- src_slot = ia64_rse_slot_num (src);
- if (src_slot == 63)
- {
- /* skip src RNaT slot */
- ++src;
- src_slot = 0;
- }
- if (first_time || src_slot == 0)
- {
- first_time = 0;
- src_rnat_addr = ia64_rse_rnat_addr (src);
- if (src_rnat_addr < src_end)
- src_rnat = *src_rnat_addr;
- else
- src_rnat = current_rnat;
- }
- nat_bit = (src_rnat >> src_slot) & 1;
-
- assert (src < src_end);
-
- *dst++ = *src++;
- if (nat_bit)
- dst_rnat |= (1UL << dst_slot);
- else
- dst_rnat &= ~(1UL << dst_slot);
- }
- }
- dst_slot = ia64_rse_slot_num (dst);
- if (dst_slot > 0)
- *ia64_rse_rnat_addr (dst) = dst_rnat;
-}
-
-void
-__sigstack_longjmp (__jmp_buf buf, int val)
-{
- unsigned long *rbs_base, *bsp, *bspstore, *jb_bsp, jb_sp, ss_sp;
- unsigned long ndirty, rnat, load_rnat, *jb_rnat_addr;
- struct sigcontext *sc;
- stack_t stk;
- struct rbs_flush_values c;
-
- /* put RSE into enforced-lazy mode and return current bsp/rsc/rnat: */
- c = __ia64_flush_rbs ();
-
- jb_sp = ((unsigned long *) buf)[JB_SP];
- jb_bsp = ((unsigned long **) buf)[JB_BSP];
-
- INTERNAL_SYSCALL_DECL (err);
- (void) INTERNAL_SYSCALL (sigaltstack, err, 2, NULL, &stk);
-
- ss_sp = (unsigned long) stk.ss_sp;
- jb_rnat_addr = ia64_rse_rnat_addr (jb_bsp);
-
- if ((stk.ss_flags & SS_ONSTACK) == 0 || jb_sp - ss_sp < stk.ss_size)
- /* Normal non-stack-crossing longjmp; if the RNaT slot for the bsp
- saved in the jump-buffer is the same as the one for the current
- BSP, use the current AR.RNAT value, otherwise, load it from the
- jump-buffer's RNaT-slot. */
- load_rnat = (ia64_rse_rnat_addr ((unsigned long *) c.bsp) != jb_rnat_addr);
- else
- {
- /* If we are on the alternate signal-stack and the jump-buffer
- lies outside the signal-stack, we may need to copy back the
- dirty partition which was torn off and saved on the
- signal-stack when the signal was delivered.
-
- Caveat: we assume that the top of the alternate signal-stack
- stores the sigcontext structure of the signal that
- caused the switch to the signal-stack. This should
- be a fairly safe assumption but the kernel _could_
- do things differently.. */
- sc = ((struct sigcontext *) ((ss_sp + stk.ss_size) & -16) - 1);
-
- /* As a sanity-check, verify that the register-backing-store base
- of the alternate signal-stack is where we expect it. */
- rbs_base = (unsigned long *)
- ((ss_sp + sizeof (long) - 1) & -sizeof (long));
-
- assert ((unsigned long) rbs_base == sc->sc_rbs_base);
-
- ndirty = ia64_rse_num_regs (rbs_base, rbs_base + (sc->sc_loadrs >> 19));
- bsp = (unsigned long *) sc->sc_ar_bsp;
- bspstore = ia64_rse_skip_regs (bsp, -ndirty);
-
- if (bspstore < jb_bsp)
- /* AR.BSPSTORE at the time of the signal was below the value
- of AR.BSP saved in the jump-buffer => copy the missing
- portion from the torn off dirty partition which got saved
- on the alternate signal-stack. */
- copy_rbs (bspstore, jb_bsp, sc->sc_ar_rnat,
- rbs_base, (unsigned long *) c.bsp, c.rnat);
-
- load_rnat = 1;
- }
- if (load_rnat)
- rnat = *jb_rnat_addr;
- else
- rnat = c.rnat;
- __ia64_longjmp (buf, val, rnat, c.rsc);
-}
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/bits/local_lim.h b/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/bits/local_lim.h
deleted file mode 100644
index f837250b9..000000000
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/bits/local_lim.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/* Minimum guaranteed maximum values for system limits. Linux/IA-64 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 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. */
-
-/* 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
-/* We have no predefined limit on the number of threads. */
-#undef PTHREAD_THREADS_MAX
-
-/* 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 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/nptl/sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h b/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
deleted file mode 100644
index afb8800ac..000000000
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
+++ /dev/null
@@ -1,160 +0,0 @@
-/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Jakub Jelinek <jakub@redhat.com>, 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 _BITS_PTHREADTYPES_H
-#define _BITS_PTHREADTYPES_H 1
-
-#define __SIZEOF_PTHREAD_ATTR_T 56
-#define __SIZEOF_PTHREAD_MUTEX_T 40
-#define __SIZEOF_PTHREAD_MUTEXATTR_T 4
-#define __SIZEOF_PTHREAD_COND_T 48
-#define __SIZEOF_PTHREAD_CONDATTR_T 4
-#define __SIZEOF_PTHREAD_RWLOCK_T 56
-#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
-#define __SIZEOF_PTHREAD_BARRIER_T 32
-#define __SIZEOF_PTHREAD_BARRIERATTR_T 4
-
-
-/* Thread identifiers. The structure of the attribute type is not
- exposed on purpose. */
-typedef unsigned long int pthread_t;
-
-
-typedef union
-{
- char __size[__SIZEOF_PTHREAD_ATTR_T];
- long int __align;
-} pthread_attr_t;
-
-
-/* Data structures for mutex handling. The structure of the attribute
- type is not exposed on purpose. */
-typedef union
-{
- struct
- {
- int __lock;
- unsigned int __count;
- int __owner;
- unsigned int __nusers;
- /* KIND must stay at this position in the structure to maintain
- binary compatibility. */
- int __kind;
- int __spins;
- } __data;
- char __size[__SIZEOF_PTHREAD_MUTEX_T];
- long int __align;
-} pthread_mutex_t;
-
-typedef union
-{
- char __size[__SIZEOF_PTHREAD_MUTEXATTR_T];
- int __align;
-} pthread_mutexattr_t;
-
-
-/* Data structure for conditional variable handling. The structure of
- the attribute type is not exposed on purpose. */
-typedef union
-{
- struct
- {
- int __lock;
- unsigned int __futex;
- __extension__ unsigned long long int __total_seq;
- __extension__ unsigned long long int __wakeup_seq;
- __extension__ unsigned long long int __woken_seq;
- void *__mutex;
- unsigned int __nwaiters;
- unsigned int __broadcast_seq;
- } __data;
- char __size[__SIZEOF_PTHREAD_COND_T];
- long int __align;
-} pthread_cond_t;
-
-typedef union
-{
- char __size[__SIZEOF_PTHREAD_CONDATTR_T];
- int __align;
-} pthread_condattr_t;
-
-
-/* Keys for thread-specific data */
-typedef unsigned int pthread_key_t;
-
-
-/* Once-only execution */
-typedef int pthread_once_t;
-
-
-#if defined __USE_UNIX98 || defined __USE_XOPEN2K
-/* Data structure for read-write lock variable handling. The
- structure of the attribute type is not exposed on purpose. */
-typedef union
-{
- struct
- {
- int __lock;
- unsigned int __nr_readers;
- unsigned int __readers_wakeup;
- unsigned int __writer_wakeup;
- unsigned int __nr_readers_queued;
- unsigned int __nr_writers_queued;
- int __writer;
- int __pad1;
- unsigned long int __pad2;
- unsigned long int __pad3;
- /* FLAGS must stay at this position in the structure to maintain
- binary compatibility. */
- unsigned int __flags;
- } __data;
- char __size[__SIZEOF_PTHREAD_RWLOCK_T];
- long int __align;
-} pthread_rwlock_t;
-
-typedef union
-{
- char __size[__SIZEOF_PTHREAD_RWLOCKATTR_T];
- long int __align;
-} pthread_rwlockattr_t;
-#endif
-
-
-#ifdef __USE_XOPEN2K
-/* POSIX spinlock data type. */
-typedef volatile int pthread_spinlock_t;
-
-
-/* POSIX barriers data type. The structure of the type is
- deliberately not exposed. */
-typedef union
-{
- char __size[__SIZEOF_PTHREAD_BARRIER_T];
- long int __align;
-} pthread_barrier_t;
-
-typedef union
-{
- char __size[__SIZEOF_PTHREAD_BARRIERATTR_T];
- int __align;
-} pthread_barrierattr_t;
-#endif
-
-
-#endif /* bits/pthreadtypes.h */
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/bits/semaphore.h b/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/bits/semaphore.h
deleted file mode 100644
index 2329e9866..000000000
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/bits/semaphore.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@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. */
-
-#ifndef _SEMAPHORE_H
-# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
-#endif
-
-
-#define __SIZEOF_SEM_T 32
-
-
-/* Value returned if `sem_open' failed. */
-#define SEM_FAILED ((sem_t *) 0)
-
-/* Maximum value the semaphore can have. */
-#define SEM_VALUE_MAX (2147483647)
-
-
-typedef union
-{
- char __size[__SIZEOF_SEM_T];
- long int __align;
-} sem_t;
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/clone2.S b/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/clone2.S
deleted file mode 100644
index 8664056f2..000000000
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/clone2.S
+++ /dev/null
@@ -1,2 +0,0 @@
-#define RESET_PID
-#include <sysdeps/unix/sysv/linux/ia64/clone2.S>
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/createthread.c b/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/createthread.c
deleted file mode 100644
index 8ac06e810..000000000
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/createthread.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/* Copyright (C) 2003 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Jakub Jelinek <jakub@redhat.com>.
-
- 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. */
-
-/* Value passed to 'clone' for initialization of the thread register. */
-#define TLS_VALUE (pd + 1)
-
-#define ARCH_CLONE __clone2
-
-/* Get the real implementation. */
-#include <nptl/sysdeps/pthread/createthread.c>
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/dl-sysdep.h b/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
deleted file mode 100644
index af835c44b..000000000
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/* System-specific settings for dynamic linker code. IA-64 version.
- Copyright (C) 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; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef _DL_SYSDEP_H
-#define _DL_SYSDEP_H 1
-
-/* This macro must be defined to either 0 or 1.
-
- If 1, then an errno global variable hidden in ld.so will work right with
- all the errno-using libc code compiled for ld.so, and there is never a
- need to share the errno location with libc. This is appropriate only if
- all the libc functions that ld.so uses are called without PLT and always
- get the versions linked into ld.so rather than the libc ones. */
-
-#ifdef IS_IN_rtld
-# define RTLD_PRIVATE_ERRNO 1
-#else
-# define RTLD_PRIVATE_ERRNO 0
-#endif
-
-/* Traditionally system calls have been made using break 0x100000. A
- second method was introduced which, if possible, will use the EPC
- instruction. To signal the presence and where to find the code the
- kernel passes an AT_SYSINFO_EHDR pointer in the auxiliary vector to
- the application. */
-#define NEED_DL_SYSINFO 1
-#define USE_DL_SYSINFO 1
-
-#if defined NEED_DL_SYSINFO && !defined __ASSEMBLER__
-/* Don't declare this as a function---we want it's entry-point, not
- it's function descriptor... */
-extern int _dl_sysinfo_break attribute_hidden;
-# define DL_SYSINFO_DEFAULT ((uintptr_t) &_dl_sysinfo_break)
-# define DL_SYSINFO_IMPLEMENTATION \
- asm (".text\n\t" \
- ".hidden _dl_sysinfo_break\n\t" \
- ".proc _dl_sysinfo_break\n\t" \
- "_dl_sysinfo_break:\n\t" \
- ".prologue\n\t" \
- ".altrp b6\n\t" \
- ".body\n\t" \
- "break 0x100000;\n\t" \
- "br.ret.sptk.many b6;\n\t" \
- ".endp _dl_sysinfo_break" \
- ".previous");
-#endif
-
-/* _dl_argv cannot be attribute_relro, because _dl_start_user
- might write into it after _dl_start returns. */
-#define DL_ARGV_NOT_RELRO 1
-
-#endif /* dl-sysdep.h */
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/fork.c b/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/fork.c
deleted file mode 100644
index 1502310f1..000000000
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/fork.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Copyright (C) 2003 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Jakub Jelinek <jakub@redhat.com>, 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 <sched.h>
-#include <signal.h>
-#include <sysdep.h>
-#include <tls.h>
-
-
-#define ARCH_FORK() \
- INLINE_SYSCALL (clone2, 6, \
- CLONE_CHILD_SETTID | CLONE_CHILD_CLEARTID | SIGCHLD, \
- NULL, 0, NULL, &THREAD_SELF->tid, NULL)
-
-#include "../fork.c"
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h b/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
deleted file mode 100644
index c6ef5f7fb..000000000
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Jakub Jelinek <jakub@redhat.com>, 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 <setjmp.h>
-#include <stdint.h>
-#include <unwind.h>
-
-#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
- ({ uintptr_t _cfa = (uintptr_t) _Unwind_GetCFA (_context) - (_adj); \
- (_cfa < (uintptr_t)(((long *)(_jmpbuf))[0]) - (_adj) \
- || (_cfa == (uintptr_t)(((long *)(_jmpbuf))[0]) - (_adj) \
- && (uintptr_t) _Unwind_GetBSP (_context) - (_adj) \
- >= (uintptr_t)(((long *)(_jmpbuf))[17]) - (_adj))); \
- })
-
-#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
- ((uintptr_t)(_address) - (_adj) < (uintptr_t)(((long *)_jmpbuf)[0]) - (_adj))
-
-/* We use a longjmp() which can cross from the alternate signal-stack
- to the normal stack. */
-extern void __libc_unwind_longjmp (sigjmp_buf env, int val)
- __attribute__ ((noreturn));
-hidden_proto (__libc_unwind_longjmp)
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h b/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h
deleted file mode 100644
index e13358ffe..000000000
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h
+++ /dev/null
@@ -1,204 +0,0 @@
-/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Jakub Jelinek <jakub@redhat.com>, 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 _LOWLEVELLOCK_H
-#define _LOWLEVELLOCK_H 1
-
-#include <time.h>
-#include <sys/param.h>
-#include <bits/pthreadtypes.h>
-#include <ia64intrin.h>
-#include <atomic.h>
-
-#define __NR_futex 1230
-#define FUTEX_WAIT 0
-#define FUTEX_WAKE 1
-#define FUTEX_REQUEUE 3
-#define FUTEX_CMP_REQUEUE 4
-
-/* Delay in spinlock loop. */
-#define BUSY_WAIT_NOP asm ("hint @pause")
-
-/* Initializer for compatibility lock. */
-#define LLL_MUTEX_LOCK_INITIALIZER (0)
-
-#define lll_futex_wait(futex, val) lll_futex_timed_wait (futex, val, 0)
-
-#define lll_futex_timed_wait(ftx, val, timespec) \
-({ \
- DO_INLINE_SYSCALL(futex, 4, (long) (ftx), FUTEX_WAIT, (int) (val), \
- (long) (timespec)); \
- _r10 == -1 ? -_retval : _retval; \
-})
-
-#define lll_futex_wake(ftx, nr) \
-({ \
- DO_INLINE_SYSCALL(futex, 3, (long) (ftx), FUTEX_WAKE, (int) (nr)); \
- _r10 == -1 ? -_retval : _retval; \
-})
-
-/* Returns non-zero if error happened, zero if success. */
-#define lll_futex_requeue(ftx, nr_wake, nr_move, mutex, val) \
-({ \
- DO_INLINE_SYSCALL(futex, 6, (long) (ftx), FUTEX_CMP_REQUEUE, \
- (int) (nr_wake), (int) (nr_move), (long) (mutex), \
- (int) val); \
- _r10 == -1; \
-})
-
-
-#define __lll_mutex_trylock(futex) \
- (atomic_compare_and_exchange_val_acq (futex, 1, 0) != 0)
-#define lll_mutex_trylock(futex) __lll_mutex_trylock (&(futex))
-
-
-#define __lll_mutex_cond_trylock(futex) \
- (atomic_compare_and_exchange_val_acq (futex, 2, 0) != 0)
-#define lll_mutex_cond_trylock(futex) __lll_mutex_cond_trylock (&(futex))
-
-
-extern void __lll_lock_wait (int *futex) attribute_hidden;
-
-
-#define __lll_mutex_lock(futex) \
- ((void) ({ \
- int *__futex = (futex); \
- if (atomic_compare_and_exchange_bool_acq (__futex, 1, 0) != 0) \
- __lll_lock_wait (__futex); \
- }))
-#define lll_mutex_lock(futex) __lll_mutex_lock (&(futex))
-
-
-#define __lll_mutex_cond_lock(futex) \
- ((void) ({ \
- int *__futex = (futex); \
- if (atomic_compare_and_exchange_bool_acq (__futex, 2, 0) != 0) \
- __lll_lock_wait (__futex); \
- }))
-#define lll_mutex_cond_lock(futex) __lll_mutex_cond_lock (&(futex))
-
-
-extern int __lll_timedlock_wait (int *futex, const struct timespec *)
- attribute_hidden;
-
-
-#define __lll_mutex_timedlock(futex, abstime) \
- ({ \
- int *__futex = (futex); \
- int __val = 0; \
- \
- if (atomic_compare_and_exchange_bool_acq (__futex, 1, 0) != 0) \
- __val = __lll_timedlock_wait (__futex, abstime); \
- __val; \
- })
-#define lll_mutex_timedlock(futex, abstime) \
- __lll_mutex_timedlock (&(futex), abstime)
-
-
-#define __lll_mutex_unlock(futex) \
- ((void) ({ \
- int *__futex = (futex); \
- int __val = atomic_exchange_rel (__futex, 0); \
- \
- if (__builtin_expect (__val > 1, 0)) \
- lll_futex_wake (__futex, 1); \
- }))
-#define lll_mutex_unlock(futex) \
- __lll_mutex_unlock(&(futex))
-
-
-#define __lll_mutex_unlock_force(futex) \
- ((void) ({ \
- int *__futex = (futex); \
- (void) atomic_exchange_rel (__futex, 0); \
- lll_futex_wake (__futex, 1); \
- }))
-#define lll_mutex_unlock_force(futex) \
- __lll_mutex_unlock_force(&(futex))
-
-
-#define lll_mutex_islocked(futex) \
- (futex != 0)
-
-
-/* We have a separate internal lock implementation which is not tied
- to binary compatibility. We can use the lll_mutex_*. */
-
-/* Type for lock object. */
-typedef int lll_lock_t;
-
-extern int lll_unlock_wake_cb (int *__futex) attribute_hidden;
-
-/* Initializers for lock. */
-#define LLL_LOCK_INITIALIZER (0)
-#define LLL_LOCK_INITIALIZER_LOCKED (1)
-
-#define lll_trylock(futex) lll_mutex_trylock (futex)
-#define lll_lock(futex) lll_mutex_lock (futex)
-#define lll_unlock(futex) lll_mutex_unlock (futex)
-#define lll_islocked(futex) lll_mutex_islocked (futex)
-
-
-/* The kernel notifies a process with uses CLONE_CLEARTID via futex
- wakeup when the clone terminates. The memory location contains the
- thread ID while the clone is running and is reset to zero
- afterwards. */
-#define lll_wait_tid(tid) \
- do \
- { \
- __typeof (tid) __tid; \
- while ((__tid = (tid)) != 0) \
- lll_futex_wait (&(tid), __tid); \
- } \
- while (0)
-
-extern int __lll_timedwait_tid (int *, const struct timespec *)
- attribute_hidden;
-
-#define lll_timedwait_tid(tid, abstime) \
- ({ \
- int __res = 0; \
- if ((tid) != 0) \
- __res = __lll_timedwait_tid (&(tid), (abstime)); \
- __res; \
- })
-
-
-/* Conditional variable handling. */
-
-extern void __lll_cond_wait (pthread_cond_t *cond)
- attribute_hidden;
-extern int __lll_cond_timedwait (pthread_cond_t *cond,
- const struct timespec *abstime)
- attribute_hidden;
-extern void __lll_cond_wake (pthread_cond_t *cond)
- attribute_hidden;
-extern void __lll_cond_broadcast (pthread_cond_t *cond)
- attribute_hidden;
-
-#define lll_cond_wait(cond) \
- __lll_cond_wait (cond)
-#define lll_cond_timedwait(cond, abstime) \
- __lll_cond_timedwait (cond, abstime)
-#define lll_cond_wake(cond) \
- __lll_cond_wake (cond)
-#define lll_cond_broadcast(cond) \
- __lll_cond_broadcast (cond)
-
-#endif /* lowlevellock.h */
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/pt-initfini.c b/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/pt-initfini.c
deleted file mode 100644
index b7d4e5794..000000000
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/pt-initfini.c
+++ /dev/null
@@ -1,143 +0,0 @@
-/* Special .init and .fini section support for ia64. NPTL 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
-
-__asm__ ("\n\
-#include \"defs.h\"\n\
-\n\
-/*@HEADER_ENDS*/\n\
-\n\
-/*@_init_PROLOG_BEGINS*/\n\
- .xdata8 \".init_array\",@fptr(__pthread_initialize_minimal_internal)\n\
-/*@_init_PROLOG_ENDS*/\n\
-");
-
-#else
-
-__asm__ ("\n\
-\n\
-#include \"defs.h\"\n\
-\n\
-/*@HEADER_ENDS*/\n\
-\n\
-/*@_init_PROLOG_BEGINS*/\n\
- .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\
- st8 [r12] = gp, -16\n\
- br.call.sptk.many b0 = __pthread_initialize_minimal_internal# ;;\n\
- ;;\n\
- adds r12 = 16, r12\n\
- ;;\n\
- ld8 gp = [r12]\n\
- ;;\n\
- .endp _init#\n\
-\n\
-/*@_init_PROLOG_ENDS*/\n\
-\n\
-/*@_init_EPILOG_BEGINS*/\n\
- .section .init\n\
- .proc _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\
- .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\
-");
-
-#endif
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/pt-vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/pt-vfork.S
deleted file mode 100644
index a28528003..000000000
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/pt-vfork.S
+++ /dev/null
@@ -1,60 +0,0 @@
-/* Copyright (C) 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; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-
-#include <sysdep.h>
-#define _SIGNAL_H
-#include <bits/signum.h>
-#include <tcb-offsets.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)
- .prologue // work around a GAS bug which triggers if
- .body // first .prologue is not at the beginning of proc.
- alloc r2=ar.pfs,0,0,2,0
- adds r14=PID,r13
- ;;
- ld4 r16=[r14]
- ;;
- sub r15=0,r16
- mov out0=CLONE_VM+CLONE_VFORK+SIGCHLD
- mov out1=0 /* Standard sp value. */
- ;;
- st4 [r14]=r15
- DO_CALL (SYS_ify (clone))
- cmp.eq p0,p7=0,r8
- adds r14=PID,r13
- ;;
-(p7) ld4 r16=[r14]
- cmp.eq p6,p0=-1,r10
- ;;
-(p7) sub r15=0,r16
- ;;
-(p7) st4 [r14]=r15
-(p6) br.cond.spnt.few __syscall_error
- ret
-PSEUDO_END(__vfork)
-
-weak_alias (__vfork, vfork)
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/pthread_once.c b/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/pthread_once.c
deleted file mode 100644
index 3b07cc127..000000000
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/pthread_once.c
+++ /dev/null
@@ -1,94 +0,0 @@
-/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Jakub Jelinek <jakub@redhat.com>, 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 "pthreadP.h"
-#include <lowlevellock.h>
-
-
-unsigned long int __fork_generation attribute_hidden;
-
-
-static void
-clear_once_control (void *arg)
-{
- pthread_once_t *once_control = (pthread_once_t *) arg;
-
- *once_control = 0;
- lll_futex_wake (once_control, INT_MAX);
-}
-
-
-int
-__pthread_once (once_control, init_routine)
- pthread_once_t *once_control;
- void (*init_routine) (void);
-{
- while (1)
- {
- int oldval, val, newval;
-
- val = *once_control;
- do
- {
- /* Check if the initialized has already been done. */
- if ((val & 2) != 0)
- return 0;
-
- oldval = val;
- newval = (oldval & 3) | __fork_generation | 1;
- val = atomic_compare_and_exchange_val_acq (once_control, newval,
- oldval);
- }
- while (__builtin_expect (val != oldval, 0));
-
- /* Check if another thread already runs the initializer. */
- if ((oldval & 1) != 0)
- {
- /* Check whether the initializer execution was interrupted
- by a fork. */
- if (((oldval ^ newval) & -4) == 0)
- {
- /* Same generation, some other thread was faster. Wait. */
- lll_futex_wait (once_control, newval);
- continue;
- }
- }
-
- /* This thread is the first here. Do the initialization.
- Register a cleanup handler so that in case the thread gets
- interrupted the initialization can be restarted. */
- pthread_cleanup_push (clear_once_control, once_control);
-
- init_routine ();
-
- pthread_cleanup_pop (0);
-
-
- /* Add one to *once_control. */
- atomic_increment (once_control);
-
- /* Wake up all other threads. */
- lll_futex_wake (once_control, INT_MAX);
- break;
- }
-
- return 0;
-}
-weak_alias (__pthread_once, pthread_once)
-strong_alias (__pthread_once, __pthread_once_internal)
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h b/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
deleted file mode 100644
index 63aaa96eb..000000000
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
+++ /dev/null
@@ -1,222 +0,0 @@
-/* Copyright (C) 2002, 2003, 2004 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 <nptl/pthreadP.h>
-#endif
-
-#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
-
-# undef PSEUDO
-
-# if USE___THREAD
-# ifndef NOT_IN_libc
-# define SYSDEP_CANCEL_ERRNO __libc_errno
-# else
-# define SYSDEP_CANCEL_ERRNO errno
-# endif
-# define SYSDEP_CANCEL_ERROR(args) \
-.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, 5, args, 0; \
- .save ar.pfs, loc0; \
- .save rp, loc1; \
- .body; \
- addl loc4 = @ltoff(@tprel(SYSDEP_CANCEL_ERRNO)), gp;; \
- ld8 loc4 = [loc4]; \
- mov rp = loc1;; \
- mov r8 = -1; \
- add loc4 = loc4, r13;; \
- st4 [loc4] = loc3; \
- mov ar.pfs = loc0
-# else
-# define SYSDEP_CANCEL_ERROR(args) \
-.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, 5, args, 0; \
- .save ar.pfs, loc0; \
- .save rp, loc1; \
- .body; \
- mov loc4 = r1;; \
- br.call.sptk.many b0 = __errno_location;; \
- st4 [r8] = loc3; \
- mov r1 = loc4; \
- mov rp = loc1; \
- mov r8 = -1; \
- mov ar.pfs = loc0
-# endif
-
-# ifndef USE_DL_SYSINFO
-
-# 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, 5, args, 0; \
- .save ar.pfs, loc0; \
- alloc loc0 = ar.pfs, args, 5, args, 0; \
- .save rp, loc1; \
- mov loc1 = rp;; \
- .body; \
- CENABLE;; \
- 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;; \
- 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; \
- SYSDEP_CANCEL_ERROR(args)
-
-# else /* USE_DL_SYSINFO */
-
-# define PSEUDO(name, syscall_name, args) \
-.text; \
-ENTRY (name) \
- .prologue; \
- adds r2 = SYSINFO_OFFSET, r13; \
- adds r14 = MULTIPLE_THREADS_OFFSET, r13; \
- .save ar.pfs, r11; \
- mov r11 = ar.pfs;; \
- .body; \
- ld4 r14 = [r14]; \
- ld8 r2 = [r2]; \
- mov r15 = SYS_ify(syscall_name);; \
- cmp4.ne p6, p7 = 0, r14; \
- mov b7 = r2; \
-(p6) br.cond.spnt .Lpseudo_cancel; \
- br.call.sptk.many b6 = b7;; \
- mov ar.pfs = r11; \
- 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, 5, args, 0; \
- .save ar.pfs, loc0; \
- alloc loc0 = ar.pfs, args, 5, args, 0; \
- adds loc4 = SYSINFO_OFFSET, r13; \
- .save rp, loc1; \
- mov loc1 = rp;; \
- .body; \
- ld8 loc4 = [loc4]; \
- CENABLE;; \
- mov loc2 = r8; \
- mov b7 = loc4; \
- COPY_ARGS_##args \
- mov r15 = SYS_ify(syscall_name); \
- br.call.sptk.many b6 = b7;; \
- mov loc3 = r8; \
- mov loc4 = r10; \
- mov out0 = loc2; \
- CDISABLE;; \
- 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; \
- SYSDEP_CANCEL_ERROR(args)
-
-# endif /* USE_DL_SYSINFO */
-
-# 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
-# elif defined IS_IN_librt
-# define CENABLE br.call.sptk.many b0 = __librt_enable_asynccancel
-# define CDISABLE br.call.sptk.many b0 = __librt_disable_asynccancel
-# else
-# error Unsupported library
-# 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, header.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__
-
-# define SINGLE_THREAD_P (1)
-# define NO_CANCELLATION 1
-
-#endif
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/timer_create.c b/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/timer_create.c
deleted file mode 100644
index 172223af3..000000000
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/timer_create.c
+++ /dev/null
@@ -1 +0,0 @@
-#include "../x86_64/timer_create.c"
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/timer_delete.c b/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/timer_delete.c
deleted file mode 100644
index 537516e0a..000000000
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/timer_delete.c
+++ /dev/null
@@ -1 +0,0 @@
-#include "../x86_64/timer_delete.c"
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/timer_getoverr.c b/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/timer_getoverr.c
deleted file mode 100644
index 3f21a73c9..000000000
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/timer_getoverr.c
+++ /dev/null
@@ -1 +0,0 @@
-#include "../x86_64/timer_getoverr.c"
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/timer_gettime.c b/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/timer_gettime.c
deleted file mode 100644
index a50143adc..000000000
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/timer_gettime.c
+++ /dev/null
@@ -1 +0,0 @@
-#include "../x86_64/timer_gettime.c"
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/timer_settime.c b/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/timer_settime.c
deleted file mode 100644
index 37baeffac..000000000
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/timer_settime.c
+++ /dev/null
@@ -1 +0,0 @@
-#include "../x86_64/timer_settime.c"
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c b/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
deleted file mode 100644
index fb44b426b..000000000
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Copyright (C) 2003 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Jakub Jelinek <jakub@redhat.com>.
-
- 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. */
-
-#include <dlfcn.h>
-#include <stdio.h>
-#include <unwind.h>
-#include <pthreadP.h>
-
-static _Unwind_Word (*libgcc_s_getbsp) (struct _Unwind_Context *);
-
-#define ARCH_CANCEL_INIT(handle) \
- ((libgcc_s_getbsp = __libc_dlsym (handle, "_Unwind_GetBSP")) == NULL)
-
-#include <sysdeps/pthread/unwind-forcedunwind.c>
-
-_Unwind_Word
-_Unwind_GetBSP (struct _Unwind_Context *context)
-{
- if (__builtin_expect (libgcc_s_getbsp == NULL, 0))
- pthread_cancel_init ();
- return libgcc_s_getbsp (context);
-}
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c b/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c
deleted file mode 100644
index 7976ff8f1..000000000
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/* Copyright (C) 1991,92,94,95,97,98,2000,02,04 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 <stddef.h>
-#include <setjmp.h>
-#include <signal.h>
-#include <pthreadP.h>
-#include <jmpbuf-unwind.h>
-
-extern void __sigstack_longjmp (__jmp_buf, int)
- __attribute__ ((noreturn));
-
-/* Like __libc_siglongjmp(), but safe for crossing from alternate
- signal stack to normal stack. Needed by NPTL. */
-void
-__libc_unwind_longjmp (sigjmp_buf env, int val)
-{
- /* Perform any cleanups needed by the frames being unwound. */
- __pthread_cleanup_upto (env->__jmpbuf, CURRENT_STACK_FRAME);
-
- if (env[0].__mask_was_saved)
- /* Restore the saved signal mask. */
- (void) __sigprocmask (SIG_SETMASK, &env[0].__saved_mask,
- (sigset_t *) NULL);
-
- /* Call the machine-dependent function to restore machine state. */
- __sigstack_longjmp (env[0].__jmpbuf, val ?: 1);
-}
-hidden_def (__libc_unwind_longjmp)
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/vfork.S
deleted file mode 100644
index 3bd721f14..000000000
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/ia64/vfork.S
+++ /dev/null
@@ -1,69 +0,0 @@
-/* Copyright (C) 2000, 2002, 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; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-
-#include <sysdep.h>
-#define _SIGNAL_H
-#include <bits/signum.h>
-#include <tcb-offsets.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)
- .prologue // work around a GAS bug which triggers if
- .body // first .prologue is not at the beginning of proc.
- alloc r2=ar.pfs,0,0,2,0
- adds r14=PID,r13
- ;;
- ld4 r16=[r14]
- ;;
- sub r15=0,r16
- cmp.eq p6,p0=0,r16
- ;;
-(p6) movl r15=0x80000000
- mov out0=CLONE_VM+CLONE_VFORK+SIGCHLD
- mov out1=0 /* Standard sp value. */
- ;;
- st4 [r14]=r15
- DO_CALL (SYS_ify (clone))
- cmp.eq p6,p0=0,r8
- adds r14=PID,r13
-(p6) br.cond.dptk 1f
- ;;
- ld4 r15=[r14]
- ;;
- extr.u r16=r15,0,31
- ;;
- cmp.eq p0,p6=0,r16
- ;;
-(p6) sub r16=0,r15
- ;;
- st4 [r14]=r16
-1:
- 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)
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h b/libpthread/nptl/sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
deleted file mode 100644
index 6b3618cd5..000000000
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
+++ /dev/null
@@ -1,195 +0,0 @@
-/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Martin Schwidefsky <schwidefsky@de.ibm.com>, 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 _BITS_PTHREADTYPES_H
-#define _BITS_PTHREADTYPES_H 1
-
-#include <bits/wordsize.h>
-
-#if __WORDSIZE == 64
-# define __SIZEOF_PTHREAD_ATTR_T 56
-# define __SIZEOF_PTHREAD_MUTEX_T 40
-# define __SIZEOF_PTHREAD_MUTEXATTR_T 4
-# define __SIZEOF_PTHREAD_COND_T 48
-# define __SIZEOF_PTHREAD_CONDATTR_T 4
-# define __SIZEOF_PTHREAD_RWLOCK_T 56
-# define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
-# define __SIZEOF_PTHREAD_BARRIER_T 32
-# define __SIZEOF_PTHREAD_BARRIERATTR_T 4
-#else
-# define __SIZEOF_PTHREAD_ATTR_T 36
-# define __SIZEOF_PTHREAD_MUTEX_T 24
-# define __SIZEOF_PTHREAD_MUTEXATTR_T 4
-# define __SIZEOF_PTHREAD_COND_T 48
-# define __SIZEOF_PTHREAD_CONDATTR_T 4
-# define __SIZEOF_PTHREAD_RWLOCK_T 32
-# define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
-# define __SIZEOF_PTHREAD_BARRIER_T 20
-# define __SIZEOF_PTHREAD_BARRIERATTR_T 4
-#endif
-
-
-/* Thread identifiers. The structure of the attribute type is not
- exposed on purpose. */
-typedef unsigned long int pthread_t;
-
-
-typedef union
-{
- char __size[__SIZEOF_PTHREAD_ATTR_T];
- long int __align;
-} pthread_attr_t;
-
-
-/* Data structures for mutex handling. The structure of the attribute
- type is not exposed on purpose. */
-typedef union
-{
- struct
- {
- int __lock;
- unsigned int __count;
- int __owner;
-#if __WORDSIZE == 64
- unsigned int __nusers;
-#endif
- /* KIND must stay at this position in the structure to maintain
- binary compatibility. */
- int __kind;
-#if __WORDSIZE != 64
- unsigned int __nusers;
-#endif
- int __spins;
- } __data;
- char __size[__SIZEOF_PTHREAD_MUTEX_T];
- long int __align;
-} pthread_mutex_t;
-
-typedef union
-{
- char __size[__SIZEOF_PTHREAD_MUTEXATTR_T];
- int __align;
-} pthread_mutexattr_t;
-
-
-/* Data structure for conditional variable handling. The structure of
- the attribute type is not exposed on purpose. */
-typedef union
-{
- struct
- {
- int __lock;
- unsigned int __futex;
- __extension__ unsigned long long int __total_seq;
- __extension__ unsigned long long int __wakeup_seq;
- __extension__ unsigned long long int __woken_seq;
- void *__mutex;
- unsigned int __nwaiters;
- unsigned int __broadcast_seq;
- } __data;
- char __size[__SIZEOF_PTHREAD_COND_T];
- __extension__ long long int __align;
-} pthread_cond_t;
-
-typedef union
-{
- char __size[__SIZEOF_PTHREAD_CONDATTR_T];
- int __align;
-} pthread_condattr_t;
-
-
-/* Keys for thread-specific data */
-typedef unsigned int pthread_key_t;
-
-
-/* Once-only execution */
-typedef int pthread_once_t;
-
-
-#if defined __USE_UNIX98 || defined __USE_XOPEN2K
-/* Data structure for read-write lock variable handling. The
- structure of the attribute type is not exposed on purpose. */
-typedef union
-{
-# if __WORDSIZE == 64
- struct
- {
- int __lock;
- unsigned int __nr_readers;
- unsigned int __readers_wakeup;
- unsigned int __writer_wakeup;
- unsigned int __nr_readers_queued;
- unsigned int __nr_writers_queued;
- int __writer;
- int __pad1;
- unsigned long int __pad2;
- unsigned long int __pad3;
- /* FLAGS must stay at this position in the structure to maintain
- binary compatibility. */
- unsigned int __flags;
- } __data;
-# else
- struct
- {
- int __lock;
- unsigned int __nr_readers;
- unsigned int __readers_wakeup;
- unsigned int __writer_wakeup;
- unsigned int __nr_readers_queued;
- unsigned int __nr_writers_queued;
- /* FLAGS must stay at this position in the structure to maintain
- binary compatibility. */
- unsigned int __flags;
- int __writer;
- } __data;
-# endif
- char __size[__SIZEOF_PTHREAD_RWLOCK_T];
- long int __align;
-} pthread_rwlock_t;
-
-typedef union
-{
- char __size[__SIZEOF_PTHREAD_RWLOCKATTR_T];
- long int __align;
-} pthread_rwlockattr_t;
-#endif
-
-
-#ifdef __USE_XOPEN2K
-/* POSIX spinlock data type. */
-typedef volatile int pthread_spinlock_t;
-
-
-/* POSIX barriers data type. The structure of the type is
- deliberately not exposed. */
-typedef union
-{
- char __size[__SIZEOF_PTHREAD_BARRIER_T];
- long int __align;
-} pthread_barrier_t;
-
-typedef union
-{
- char __size[__SIZEOF_PTHREAD_BARRIERATTR_T];
- int __align;
-} pthread_barrierattr_t;
-#endif
-
-
-#endif /* bits/pthreadtypes.h */
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/s390/bits/semaphore.h b/libpthread/nptl/sysdeps/unix/sysv/linux/s390/bits/semaphore.h
deleted file mode 100644
index ead266304..000000000
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/s390/bits/semaphore.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* Copyright (C) 2003 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Martin Schwidefsky <schwidefsky@de.ibm.com>, 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 _SEMAPHORE_H
-# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
-#endif
-
-#include <bits/wordsize.h>
-
-#if __WORDSIZE == 64
-# define __SIZEOF_SEM_T 32
-#else
-# define __SIZEOF_SEM_T 16
-#endif
-
-/* Value returned if `sem_open' failed. */
-#define SEM_FAILED ((sem_t *) 0)
-
-/* Maximum value the semaphore can have. */
-#define SEM_VALUE_MAX (2147483647)
-
-
-typedef union
-{
- char __size[__SIZEOF_SEM_T];
- long int __align;
-} sem_t;
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/s390/fork.c b/libpthread/nptl/sysdeps/unix/sysv/linux/s390/fork.c
deleted file mode 100644
index 06635ab81..000000000
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/s390/fork.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Copyright (C) 2003 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Martin Schwidefsky <schwidefsky@de.ibm.com>, 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 <sched.h>
-#include <signal.h>
-#include <sysdep.h>
-#include <tls.h>
-
-
-#define ARCH_FORK() \
- INLINE_SYSCALL (clone, 5, \
- 0, CLONE_CHILD_SETTID | CLONE_CHILD_CLEARTID | SIGCHLD, \
- NULL, &THREAD_SELF->tid, NULL)
-
-#include "../fork.c"
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/s390/jmp-unwind.c b/libpthread/nptl/sysdeps/unix/sysv/linux/s390/jmp-unwind.c
deleted file mode 100644
index 36886f58a..000000000
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/s390/jmp-unwind.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/* Clean up stack frames unwound by longjmp. Linux/s390 version.
- Copyright (C) 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; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <setjmp.h>
-#include <stddef.h>
-#include <pthreadP.h>
-
-extern void __pthread_cleanup_upto (__jmp_buf env, char *targetframe);
-#pragma weak __pthread_cleanup_upto
-
-
-void
-_longjmp_unwind (jmp_buf env, int val)
-{
-#ifdef SHARED
-# define fptr __libc_pthread_functions.ptr___pthread_cleanup_upto
-#else
-# define fptr __pthread_cleanup_upto
-#endif
-
- unsigned char local_var;
-
- if (fptr != NULL)
- fptr (env->__jmpbuf, &local_var);
-}
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h b/libpthread/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h
deleted file mode 100644
index f4ed98a50..000000000
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h
+++ /dev/null
@@ -1,282 +0,0 @@
-/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Martin Schwidefsky <schwidefsky@de.ibm.com>, 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 _LOWLEVELLOCK_H
-#define _LOWLEVELLOCK_H 1
-
-#include <time.h>
-#include <sys/param.h>
-#include <bits/pthreadtypes.h>
-#include <atomic.h>
-
-#define SYS_futex 238
-#define FUTEX_WAIT 0
-#define FUTEX_WAKE 1
-#define FUTEX_REQUEUE 3
-#define FUTEX_CMP_REQUEUE 4
-
-/* Initializer for compatibility lock. */
-#define LLL_MUTEX_LOCK_INITIALIZER (0)
-
-#define lll_futex_wait(futex, val) \
- ({ \
- register unsigned long int __r2 asm ("2") = (unsigned long int) (futex); \
- register unsigned long int __r3 asm ("3") = FUTEX_WAIT; \
- register unsigned long int __r4 asm ("4") = (unsigned long int) (val); \
- register unsigned long int __r5 asm ("5") = 0ul; \
- register unsigned long __result asm ("2"); \
- \
- __asm __volatile ("svc %b1" \
- : "=d" (__result) \
- : "i" (SYS_futex), "0" (__r2), "d" (__r3), \
- "d" (__r4), "d" (__r5) \
- : "cc", "memory" ); \
- __result; \
- })
-
-
-#define lll_futex_timed_wait(futex, val, timespec) \
- ({ \
- register unsigned long int __r2 asm ("2") = (unsigned long int) (futex); \
- register unsigned long int __r3 asm ("3") = FUTEX_WAIT; \
- register unsigned long int __r4 asm ("4") = (unsigned long int) (val); \
- register unsigned long int __r5 asm ("5") = (unsigned long int)(timespec);\
- register unsigned long int __result asm ("2"); \
- \
- __asm __volatile ("svc %b1" \
- : "=d" (__result) \
- : "i" (SYS_futex), "0" (__r2), "d" (__r3), \
- "d" (__r4), "d" (__r5) \
- : "cc", "memory" ); \
- __result; \
- })
-
-
-#define lll_futex_wake(futex, nr) \
- ({ \
- register unsigned long int __r2 asm ("2") = (unsigned long int) (futex); \
- register unsigned long int __r3 asm ("3") = FUTEX_WAKE; \
- register unsigned long int __r4 asm ("4") = (unsigned long int) (nr); \
- register unsigned long int __result asm ("2"); \
- \
- __asm __volatile ("svc %b1" \
- : "=d" (__result) \
- : "i" (SYS_futex), "0" (__r2), "d" (__r3), "d" (__r4) \
- : "cc", "memory" ); \
- __result; \
- })
-
-
-/* Returns non-zero if error happened, zero if success. */
-#define lll_futex_requeue(futex, nr_wake, nr_move, mutex, val) \
- ({ \
- register unsigned long int __r2 asm ("2") = (unsigned long int) (futex); \
- register unsigned long int __r3 asm ("3") = FUTEX_CMP_REQUEUE; \
- register unsigned long int __r4 asm ("4") = (long int) (nr_wake); \
- register unsigned long int __r5 asm ("5") = (long int) (nr_move); \
- register unsigned long int __r6 asm ("6") = (unsigned long int) (mutex); \
- register unsigned long int __r7 asm ("7") = (int) (val); \
- register unsigned long __result asm ("2"); \
- \
- __asm __volatile ("svc %b1" \
- : "=d" (__result) \
- : "i" (SYS_futex), "0" (__r2), "d" (__r3), \
- "d" (__r4), "d" (__r5), "d" (__r6), "d" (__r7) \
- : "cc", "memory" ); \
- __result > -4096UL; \
- })
-
-
-#define lll_compare_and_swap(futex, oldval, newval, operation) \
- do { \
- __typeof (futex) __futex = (futex); \
- __asm __volatile (" l %1,%0\n" \
- "0: " operation "\n" \
- " cs %1,%2,%0\n" \
- " jl 0b\n" \
- "1:" \
- : "=Q" (*__futex), "=&d" (oldval), "=&d" (newval) \
- : "m" (*__futex) : "cc", "memory" ); \
- } while (0)
-
-
-static inline int
-__attribute__ ((always_inline))
-__lll_mutex_trylock (int *futex)
-{
- unsigned int old;
-
- __asm __volatile ("cs %0,%3,%1"
- : "=d" (old), "=Q" (*futex)
- : "0" (0), "d" (1), "m" (*futex) : "cc", "memory" );
- return old != 0;
-}
-#define lll_mutex_trylock(futex) __lll_mutex_trylock (&(futex))
-
-
-static inline int
-__attribute__ ((always_inline))
-__lll_mutex_cond_trylock (int *futex)
-{
- unsigned int old;
-
- __asm __volatile ("cs %0,%3,%1"
- : "=d" (old), "=Q" (*futex)
- : "0" (0), "d" (2), "m" (*futex) : "cc", "memory" );
- return old != 0;
-}
-#define lll_mutex_cond_trylock(futex) __lll_mutex_cond_trylock (&(futex))
-
-
-extern void __lll_lock_wait (int *futex) attribute_hidden;
-
-static inline void
-__attribute__ ((always_inline))
-__lll_mutex_lock (int *futex)
-{
- if (atomic_compare_and_exchange_bool_acq (futex, 1, 0) != 0)
- __lll_lock_wait (futex);
-}
-#define lll_mutex_lock(futex) __lll_mutex_lock (&(futex))
-
-static inline void
-__attribute__ ((always_inline))
-__lll_mutex_cond_lock (int *futex)
-{
- if (atomic_compare_and_exchange_bool_acq (futex, 2, 0) != 0)
- __lll_lock_wait (futex);
-}
-#define lll_mutex_cond_lock(futex) __lll_mutex_cond_lock (&(futex))
-
-extern int __lll_timedlock_wait
- (int *futex, const struct timespec *) attribute_hidden;
-
-static inline int
-__attribute__ ((always_inline))
-__lll_mutex_timedlock (int *futex, const struct timespec *abstime)
-{
- int result = 0;
- if (atomic_compare_and_exchange_bool_acq (futex, 1, 0) != 0)
- result = __lll_timedlock_wait (futex, abstime);
- return result;
-}
-#define lll_mutex_timedlock(futex, abstime) \
- __lll_mutex_timedlock (&(futex), abstime)
-
-
-static inline void
-__attribute__ ((always_inline))
-__lll_mutex_unlock (int *futex)
-{
- int oldval;
- int newval = 0;
-
- lll_compare_and_swap (futex, oldval, newval, "slr %2,%2");
- if (oldval > 1)
- lll_futex_wake (futex, 1);
-}
-#define lll_mutex_unlock(futex) \
- __lll_mutex_unlock(&(futex))
-
-
-static inline void
-__attribute__ ((always_inline))
-__lll_mutex_unlock_force (int *futex)
-{
- *futex = 0;
- lll_futex_wake (futex, 1);
-}
-#define lll_mutex_unlock_force(futex) \
- __lll_mutex_unlock_force(&(futex))
-
-#define lll_mutex_islocked(futex) \
- (futex != 0)
-
-
-/* We have a separate internal lock implementation which is not tied
- to binary compatibility. We can use the lll_mutex_*. */
-
-/* Type for lock object. */
-typedef int lll_lock_t;
-
-/* Initializers for lock. */
-#define LLL_LOCK_INITIALIZER (0)
-#define LLL_LOCK_INITIALIZER_LOCKED (1)
-
-#define lll_trylock(futex) lll_mutex_trylock (futex)
-#define lll_lock(futex) lll_mutex_lock (futex)
-#define lll_unlock(futex) lll_mutex_unlock (futex)
-#define lll_islocked(futex) lll_mutex_islocked (futex)
-
-extern int lll_unlock_wake_cb (int *__futex) attribute_hidden;
-
-/* The states of a lock are:
- 1 - untaken
- 0 - taken by one user
- <0 - taken by more users */
-
-
-/* The kernel notifies a process with uses CLONE_CLEARTID via futex
- wakeup when the clone terminates. The memory location contains the
- thread ID while the clone is running and is reset to zero
- afterwards. */
-static inline void
-__attribute__ ((always_inline))
-__lll_wait_tid (int *ptid)
-{
- int tid;
-
- while ((tid = *ptid) != 0)
- lll_futex_wait (ptid, tid);
-}
-#define lll_wait_tid(tid) __lll_wait_tid(&(tid))
-
-extern int __lll_timedwait_tid (int *, const struct timespec *)
- attribute_hidden;
-
-#define lll_timedwait_tid(tid, abstime) \
- ({ \
- int __res = 0; \
- if ((tid) != 0) \
- __res = __lll_timedwait_tid (&(tid), (abstime)); \
- __res; \
- })
-
-/* Conditional variable handling. */
-
-extern void __lll_cond_wait (pthread_cond_t *cond)
- attribute_hidden;
-extern int __lll_cond_timedwait (pthread_cond_t *cond,
- const struct timespec *abstime)
- attribute_hidden;
-extern void __lll_cond_wake (pthread_cond_t *cond)
- attribute_hidden;
-extern void __lll_cond_broadcast (pthread_cond_t *cond)
- attribute_hidden;
-
-#define lll_cond_wait(cond) \
- __lll_cond_wait (cond)
-#define lll_cond_timedwait(cond, abstime) \
- __lll_cond_timedwait (cond, abstime)
-#define lll_cond_wake(cond) \
- __lll_cond_wake (cond)
-#define lll_cond_broadcast(cond) \
- __lll_cond_broadcast (cond)
-
-#endif /* lowlevellock.h */
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/s390/not-cancel.h b/libpthread/nptl/sysdeps/unix/sysv/linux/s390/not-cancel.h
deleted file mode 100644
index acf1a617e..000000000
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/s390/not-cancel.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../i386/not-cancel.h"
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/s390/pthread_once.c b/libpthread/nptl/sysdeps/unix/sysv/linux/s390/pthread_once.c
deleted file mode 100644
index f29e23fd4..000000000
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/s390/pthread_once.c
+++ /dev/null
@@ -1,111 +0,0 @@
-/* Copyright (C) 2003 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Martin Schwidefsky <schwidefsky@de.ibm.com>, 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 "pthreadP.h"
-#include <lowlevellock.h>
-
-
-unsigned long int __fork_generation attribute_hidden;
-
-
-static void
-clear_once_control (void *arg)
-{
- pthread_once_t *once_control = (pthread_once_t *) arg;
-
- *once_control = 0;
- lll_futex_wake (once_control, INT_MAX);
-}
-
-
-int
-__pthread_once (once_control, init_routine)
- pthread_once_t *once_control;
- void (*init_routine) (void);
-{
- while (1)
- {
- int oldval;
- int newval;
-
- /* Pseudo code:
- oldval = *once_control;
- if ((oldval & 2) == 0)
- {
- newval = (oldval & 3) | __fork_generation | 1;
- *once_control = newval;
- }
- Do this atomically. */
- __asm __volatile (" l %1,%0\n"
- "0: lhi %2,2\n"
- " tml %1,2\n"
- " jnz 1f\n"
- " nr %2,%1\n"
- " ahi %2,1\n"
- " o %2,%3\n"
- " cs %1,%2,%0\n"
- " jl 0b\n"
- "1:"
- : "=Q" (*once_control), "=&d" (oldval), "=&d" (newval)
- : "m" (__fork_generation), "m" (*once_control)
- : "cc" );
- /* Check if the initialized has already been done. */
- if ((oldval & 2) != 0)
- break;
- /* Check if another thread already runs the initializer. */
- if ((oldval & 1) != 0)
- {
- /* Check whether the initializer execution was interrupted
- by a fork. */
- if (((oldval ^ newval) & -4) == 0)
- {
- /* Same generation, some other thread was faster. Wait. */
- lll_futex_wait (once_control, newval);
- continue;
- }
- }
-
- /* This thread is the first here. Do the initialization.
- Register a cleanup handler so that in case the thread gets
- interrupted the initialization can be restarted. */
- pthread_cleanup_push (clear_once_control, once_control);
-
- init_routine ();
-
- pthread_cleanup_pop (0);
-
-
- /* Add one to *once_control. */
- __asm __volatile (" l %1,%0\n"
- "0: lr %2,%1\n"
- " ahi %2,1\n"
- " cs %1,%2,%0\n"
- " jl 0b\n"
- : "=Q" (*once_control), "=&d" (oldval), "=&d" (newval)
- : "m" (*once_control) : "cc" );
-
- /* Wake up all other threads. */
- lll_futex_wake (once_control, INT_MAX);
- break;
- }
-
- return 0;
-}
-weak_alias (__pthread_once, pthread_once)
-strong_alias (__pthread_once, __pthread_once_internal)
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/s390/s390-32/clone.S b/libpthread/nptl/sysdeps/unix/sysv/linux/s390/s390-32/clone.S
deleted file mode 100644
index 682f94dae..000000000
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/s390/s390-32/clone.S
+++ /dev/null
@@ -1,2 +0,0 @@
-#define RESET_PID
-#include <sysdeps/unix/sysv/linux/s390/s390-32/clone.S>
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c b/libpthread/nptl/sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c
deleted file mode 100644
index 40d4d50c3..000000000
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c
+++ /dev/null
@@ -1,154 +0,0 @@
-/* Special .init and .fini section support for S/390.
- 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.
-
- 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. */
-
-__asm__ ("\
-\n\
-#include \"defs.h\"\n\
-\n\
-/*@HEADER_ENDS*/\n\
-\n\
-/*@TESTS_BEGIN*/\n\
-\n\
-/*@TESTS_END*/\n\
-\n\
-/*@_init_PROLOG_BEGINS*/\n\
-\n\
- .section .init\n\
-#NO_APP\n\
- .align 4\n\
-.globl _init\n\
- .type _init,@function\n\
-_init:\n\
-# leaf function 0\n\
-# automatics 0\n\
-# outgoing args 0\n\
-# need frame pointer 0\n\
-# call alloca 0\n\
-# has varargs 0\n\
-# incoming args (stack) 0\n\
-# function length 36\n\
- STM 6,15,24(15)\n\
- BRAS 13,.LTN1_0\n\
-.LT1_0:\n\
-.LC13:\n\
- .long __pthread_initialize_minimal_internal-.LT1_0\n\
-.LC14:\n\
- .long __gmon_start__@GOT\n\
-.LC15:\n\
- .long _GLOBAL_OFFSET_TABLE_-.LT1_0\n\
-.LTN1_0:\n\
- LR 1,15\n\
- AHI 15,-96\n\
- ST 1,0(15)\n\
- L 12,.LC15-.LT1_0(13)\n\
- AR 12,13\n\
- L 1,.LC13-.LT1_0(13)\n\
- LA 1,0(1,13)\n\
- BASR 14,1\n\
- L 1,.LC14-.LT1_0(13)\n\
- L 1,0(1,12)\n\
- LTR 1,1\n\
- JE .L22\n\
- BASR 14,1\n\
-.L22:\n\
-#APP\n\
- .align 4,0x07\n\
- END_INIT\n\
-\n\
-/*@_init_PROLOG_ENDS*/\n\
-\n\
-/*@_init_EPILOG_BEGINS*/\n\
- .align 4\n\
- .section .init\n\
-#NO_APP\n\
- .align 4\n\
- L 4,152(15)\n\
- LM 6,15,120(15)\n\
- BR 4\n\
-#APP\n\
- END_INIT\n\
-\n\
-/*@_init_EPILOG_ENDS*/\n\
-\n\
-/*@_fini_PROLOG_BEGINS*/\n\
- .section .fini\n\
-#NO_APP\n\
- .align 4\n\
-.globl _fini\n\
- .type _fini,@function\n\
-_fini:\n\
-# leaf function 0\n\
-# automatics 0\n\
-# outgoing args 0\n\
-# need frame pointer 0\n\
-# call alloca 0\n\
-# has varargs 0\n\
-# incoming args (stack) 0\n\
-# function length 30\n\
- STM 6,15,24(15)\n\
- BRAS 13,.LTN2_0\n\
-.LT2_0:\n\
-.LC17:\n\
- .long _GLOBAL_OFFSET_TABLE_-.LT2_0\n\
-.LTN2_0:\n\
- LR 1,15\n\
- AHI 15,-96\n\
- ST 1,0(15)\n\
- L 12,.LC17-.LT2_0(13)\n\
- AR 12,13\n\
-#APP\n\
- .align 4,0x07\n\
- END_FINI\n\
-\n\
-/*@_fini_PROLOG_ENDS*/\n\
-\n\
-/*@_fini_EPILOG_BEGINS*/\n\
- .align 4\n\
- .section .fini\n\
-#NO_APP\n\
- .align 4\n\
- L 4,152(15)\n\
- LM 6,15,120(15)\n\
- BR 4\n\
-#APP\n\
- END_FINI\n\
-\n\
-/*@_fini_EPILOG_ENDS*/\n\
-\n\
-/*@TRAILER_BEGINS*/\
-");
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S
deleted file mode 100644
index 60d6dbdef..000000000
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S
+++ /dev/null
@@ -1,54 +0,0 @@
-/* Copyright (C) 2003 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Martin Schwidefsky <schwidefsky@de.ibm.com>, 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 <sysdep.h>
-#define _ERRNO_H 1
-#include <bits/errno.h>
-#include <kernel-features.h>
-#include <bits/wordsize.h>
-#include <tcb-offsets.h>
-
-/* 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. */
-
-ENTRY (__vfork)
- ear %r4,%a0
- l %r3,PID(%r4)
- lcr %r1,%r3
- st %r1,PID(%r4)
-
- /* Do vfork system call. */
- svc SYS_ify (vfork)
-
- ltr %r2,%r2
- je 1f
- st %r3,PID(%r4)
-1:
- /* Check for error. */
- lhi %r4,-4095
- clr %r2,%r4
- jnl SYSCALL_ERROR_LABEL
-
- /* Normal return. */
- br %r14
-PSEUDO_END(__vfork)
-
-weak_alias (__vfork, vfork)
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h b/libpthread/nptl/sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
deleted file mode 100644
index 09dac2c90..000000000
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
+++ /dev/null
@@ -1,115 +0,0 @@
-/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Jakub Jelinek <jakub@redhat.com>, 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 <sysdep.h>
-#include <tls.h>
-#ifndef __ASSEMBLER__
-# include <nptl/pthreadP.h>
-#endif
-
-#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
-
-# undef PSEUDO
-# define PSEUDO(name, syscall_name, args) \
- .text; \
-L(pseudo_cancel): \
- cfi_startproc; \
- STM_##args \
- stm %r12,%r15,48(%r15); \
- cfi_offset (%r15, -36); \
- cfi_offset (%r14, -40); \
- cfi_offset (%r13, -44); \
- cfi_offset (%r12, -48); \
- lr %r14,%r15; \
- ahi %r15,-96; \
- cfi_adjust_cfa_offset (96); \
- st %r14,0(%r15); \
- basr %r13,0; \
-0: l %r1,1f-0b(%r13); \
- bas %r14,0(%r1,%r13); \
- lr %r0,%r2; \
- LM_##args \
- DO_CALL(syscall_name, args); \
- l %r1,2f-0b(%r13); \
- lr %r12,%r2; \
- lr %r2,%r0; \
- bas %r14,0(%r1,%r13); \
- lr %r2,%r12; \
- lm %r12,%r15,48+96(%r15); \
- cfi_endproc; \
- j L(pseudo_check); \
-1: .long CENABLE-0b; \
-2: .long CDISABLE-0b; \
-ENTRY(name) \
- SINGLE_THREAD_P(%r1) \
- jne L(pseudo_cancel); \
-.type __##syscall_name##_nocancel,@function; \
-.globl __##syscall_name##_nocancel; \
-__##syscall_name##_nocancel: \
- DO_CALL(syscall_name, args); \
-L(pseudo_check): \
- lhi %r4,-4095; \
- clr %r2,%r4; \
- jnl SYSCALL_ERROR_LABEL; \
-.size __##syscall_name##_nocancel,.-__##syscall_name##_nocancel; \
-L(pseudo_end):
-
-# ifdef IS_IN_libpthread
-# define CENABLE __pthread_enable_asynccancel
-# define CDISABLE __pthread_disable_asynccancel
-# elif !defined NOT_IN_libc
-# define CENABLE __libc_enable_asynccancel
-# define CDISABLE __libc_disable_asynccancel
-# elif defined IS_IN_librt
-# define CENABLE __librt_enable_asynccancel
-# define CDISABLE __librt_disable_asynccancel
-# else
-# error Unsupported library
-# endif
-
-#define STM_0 /* Nothing */
-#define STM_1 st %r2,8(%r15);
-#define STM_2 stm %r2,%r3,8(%r15);
-#define STM_3 stm %r2,%r4,8(%r15);
-#define STM_4 stm %r2,%r5,8(%r15);
-#define STM_5 stm %r2,%r5,8(%r15);
-
-#define LM_0 /* Nothing */
-#define LM_1 l %r2,8+96(%r15);
-#define LM_2 lm %r2,%r3,8+96(%r15);
-#define LM_3 lm %r2,%r4,8+96(%r15);
-#define LM_4 lm %r2,%r5,8+96(%r15);
-#define LM_5 lm %r2,%r5,8+96(%r15);
-
-# ifndef __ASSEMBLER__
-# define SINGLE_THREAD_P \
- __builtin_expect (THREAD_GETMEM (THREAD_SELF, \
- header.multiple_threads) == 0, 1)
-# else
-# define SINGLE_THREAD_P(reg) \
- ear reg,%a0; \
- icm reg,15,MULTIPLE_THREADS_OFFSET(reg);
-# endif
-
-#elif !defined __ASSEMBLER__
-
-# define SINGLE_THREAD_P (1)
-# define NO_CANCELLATION 1
-
-#endif
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/s390/s390-32/vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/s390/s390-32/vfork.S
deleted file mode 100644
index 7b139341f..000000000
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/s390/s390-32/vfork.S
+++ /dev/null
@@ -1,57 +0,0 @@
-/* Copyright (C) 2004 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Jakub Jelinek <jakub@redhat.com>, 2004.
-
- 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>
-#define _ERRNO_H 1
-#include <bits/errno.h>
-#include <kernel-features.h>
-#include <bits/wordsize.h>
-#include <tcb-offsets.h>
-
-/* 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. */
-
-ENTRY (__vfork)
- ear %r4,%a0
- lhi %r1,1
- icm %r3,15,PID(%r4)
- sll %r1,31
- je 1f
- lcr %r1,%r3
-1: st %r1,PID(%r4)
-
- /* Do vfork system call. */
- svc SYS_ify (vfork)
-
- ltr %r2,%r2
- je 1f
- st %r3,PID(%r4)
-1:
- /* Check for error. */
- lhi %r4,-4095
- clr %r2,%r4
- jnl SYSCALL_ERROR_LABEL
-
- /* Normal return. */
- br %r14
-PSEUDO_END(__vfork)
-libc_hidden_def (__vfork)
-weak_alias (__vfork, vfork)
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/s390/s390-64/Versions b/libpthread/nptl/sysdeps/unix/sysv/linux/s390/s390-64/Versions
deleted file mode 100644
index 3b111ddb5..000000000
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/s390/s390-64/Versions
+++ /dev/null
@@ -1,7 +0,0 @@
-librt {
- GLIBC_2.3.3 {
- # Changed timer_t.
- timer_create; timer_delete; timer_getoverrun; timer_gettime;
- timer_settime;
- }
-}
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/s390/s390-64/clone.S b/libpthread/nptl/sysdeps/unix/sysv/linux/s390/s390-64/clone.S
deleted file mode 100644
index 87ee2e184..000000000
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/s390/s390-64/clone.S
+++ /dev/null
@@ -1,2 +0,0 @@
-#define RESET_PID
-#include <sysdeps/unix/sysv/linux/s390/s390-64/clone.S>
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c b/libpthread/nptl/sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c
deleted file mode 100644
index a102d07d6..000000000
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c
+++ /dev/null
@@ -1,136 +0,0 @@
-/* Special .init and .fini section support for 64 bit S/390.
- 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.
-
- 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. */
-
-__asm__ ("\
-\n\
-#include \"defs.h\"\n\
-\n\
-/*@HEADER_ENDS*/\n\
-\n\
-/*@TESTS_BEGIN*/\n\
-\n\
-/*@TESTS_END*/\n\
-\n\
-/*@_init_PROLOG_BEGINS*/\n\
-\n\
- .section .init\n\
-#NO_APP\n\
- .align 4\n\
-.globl _init\n\
- .type _init,@function\n\
-_init:\n\
-# leaf function 0\n\
-# automatics 0\n\
-# outgoing args 0\n\
-# need frame pointer 0\n\
-# call alloca 0\n\
-# has varargs 0\n\
-# incoming args (stack) 0\n\
-# function length 36\n\
- STMG 6,15,48(15)\n\
- LGR 1,15\n\
- AGHI 15,-160\n\
- STG 1,0(15)\n\
- LARL 12,_GLOBAL_OFFSET_TABLE_\n\
- BRASL 14,__pthread_initialize_minimal_internal\n\
- LARL 1,__gmon_start__@GOTENT\n\
- LG 1,0(1)\n\
- LTGR 1,1\n\
- JE .L22\n\
- BASR 14,1\n\
-.L22:\n\
-#APP\n\
- .align 4,0x07\n\
- END_INIT\n\
-\n\
-/*@_init_PROLOG_ENDS*/\n\
-\n\
-/*@_init_EPILOG_BEGINS*/\n\
- .align 4\n\
- .section .init\n\
-#NO_APP\n\
- .align 4\n\
- LG 4,272(15)\n\
- LMG 6,15,208(15)\n\
- BR 4\n\
-#APP\n\
- END_INIT\n\
-\n\
-/*@_init_EPILOG_ENDS*/\n\
-\n\
-/*@_fini_PROLOG_BEGINS*/\n\
- .section .fini\n\
-#NO_APP\n\
- .align 4\n\
-.globl _fini\n\
- .type _fini,@function\n\
-_fini:\n\
-# leaf function 0\n\
-# automatics 0\n\
-# outgoing args 0\n\
-# need frame pointer 0\n\
-# call alloca 0\n\
-# has varargs 0\n\
-# incoming args (stack) 0\n\
-# function length 30\n\
- STMG 6,15,48(15)\n\
- LGR 1,15\n\
- AGHI 15,-160\n\
- STG 1,0(15)\n\
- LARL 12,_GLOBAL_OFFSET_TABLE_\n\
-#APP\n\
- .align 4,0x07\n\
- END_FINI\n\
-\n\
-/*@_fini_PROLOG_ENDS*/\n\
-\n\
-/*@_fini_EPILOG_BEGINS*/\n\
- .align 4\n\
- .section .fini\n\
-#NO_APP\n\
- .align 4\n\
- LG 4,272(15)\n\
- LMG 6,15,208(15)\n\
- BR 4\n\
-#APP\n\
- END_FINI\n\
-\n\
-/*@_fini_EPILOG_ENDS*/\n\
-\n\
-/*@TRAILER_BEGINS*/\n\
- ");
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S
deleted file mode 100644
index 04ae5bf59..000000000
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S
+++ /dev/null
@@ -1,57 +0,0 @@
-/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Martin Schwidefsky <schwidefsky@de.ibm.com>, 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 <sysdep.h>
-#define _ERRNO_H 1
-#include <bits/errno.h>
-#include <kernel-features.h>
-#include <bits/wordsize.h>
-#include <tcb-offsets.h>
-
-/* 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. */
-
-ENTRY (__vfork)
-
- ear %r4,%a0
- sllg %r4,%r4,32
- ear %r4,%a1
- l %r3,PID(%r4)
- lcr %r1,%r3
- st %r1,PID(%r4)
-
- /* Do vfork system call. */
- svc SYS_ify (vfork)
-
- ltgr %r2,%r2
- je 1f
- st %r3,PID(%r4)
-1:
- /* Check for error. */
- lghi %r4,-4095
- clgr %r2,%r4
- jgnl SYSCALL_ERROR_LABEL
-
- /* Normal return. */
- br %r14
-PSEUDO_END(__vfork)
-
-weak_alias (__vfork, vfork)
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h b/libpthread/nptl/sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
deleted file mode 100644
index f8eb6a9eb..000000000
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
+++ /dev/null
@@ -1,128 +0,0 @@
-/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Jakub Jelinek <jakub@redhat.com>, 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 <sysdep.h>
-#include <tls.h>
-#ifndef __ASSEMBLER__
-# include <nptl/pthreadP.h>
-#endif
-
-#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
-
-# undef PSEUDO
-# define PSEUDO(name, syscall_name, args) \
- .text; \
-L(pseudo_cancel): \
- cfi_startproc; \
- STM_##args \
- stmg %r13,%r15,104(%r15); \
- cfi_offset (%r15,-40); \
- cfi_offset (%r14,-48); \
- cfi_offset (%r13,-56); \
- lgr %r14,%r15; \
- aghi %r15,-160; \
- cfi_adjust_cfa_offset (160); \
- stg %r14,0(%r15); \
- brasl %r14,CENABLE; \
- lgr %r0,%r2; \
- LM_##args \
- DO_CALL(syscall_name, args); \
- lgr %r13,%r2; \
- lgr %r2,%r0; \
- brasl %r14,CDISABLE; \
- lgr %r2,%r13; \
- lmg %r13,%r15,104+160(%r15); \
- cfi_endproc; \
- j L(pseudo_check); \
-ENTRY(name) \
- SINGLE_THREAD_P \
- jne L(pseudo_cancel); \
-.type __##syscall_name##_nocancel,@function; \
-.globl __##syscall_name##_nocancel; \
-__##syscall_name##_nocancel: \
- DO_CALL(syscall_name, args); \
-L(pseudo_check): \
- lghi %r4,-4095; \
- clgr %r2,%r4; \
- jgnl SYSCALL_ERROR_LABEL; \
-.size __##syscall_name##_nocancel,.-__##syscall_name##_nocancel; \
-L(pseudo_end):
-
-# ifdef IS_IN_libpthread
-# define CENABLE __pthread_enable_asynccancel
-# define CDISABLE __pthread_disable_asynccancel
-# define __local_multiple_threads __pthread_multiple_threads
-# elif !defined NOT_IN_libc
-# define CENABLE __libc_enable_asynccancel
-# define CDISABLE __libc_disable_asynccancel
-# define __local_multiple_threads __libc_multiple_threads
-# elif defined IS_IN_librt
-# define CENABLE __librt_enable_asynccancel
-# define CDISABLE __librt_disable_asynccancel
-# else
-# error Unsupported library
-# endif
-
-#define STM_0 /* Nothing */
-#define STM_1 stg %r2,16(%r15);
-#define STM_2 stmg %r2,%r3,16(%r15);
-#define STM_3 stmg %r2,%r4,16(%r15);
-#define STM_4 stmg %r2,%r5,16(%r15);
-#define STM_5 stmg %r2,%r5,16(%r15);
-
-#define LM_0 /* Nothing */
-#define LM_1 lg %r2,16+160(%r15);
-#define LM_2 lmg %r2,%r3,16+160(%r15);
-#define LM_3 lmg %r2,%r4,16+160(%r15);
-#define LM_4 lmg %r2,%r5,16+160(%r15);
-#define LM_5 lmg %r2,%r5,16+160(%r15);
-
-# if defined IS_IN_libpthread || !defined NOT_IN_libc
-# ifndef __ASSEMBLER__
-extern int __local_multiple_threads attribute_hidden;
-# define SINGLE_THREAD_P \
- __builtin_expect (__local_multiple_threads == 0, 1)
-# else
-# define SINGLE_THREAD_P \
- larl %r1,__local_multiple_threads; \
- icm %r0,15,0(%r1);
-# endif
-
-# else
-
-# ifndef __ASSEMBLER__
-# define SINGLE_THREAD_P \
- __builtin_expect (THREAD_GETMEM (THREAD_SELF, \
- header.multiple_threads) == 0, 1)
-# else
-# define SINGLE_THREAD_P \
- ear %r1,%a0; \
- sllg %r1,%r1,32; \
- ear %r1,%a1; \
- icm %r1,15,MULTIPLE_THREADS_OFFSET(%r1);
-# endif
-
-# endif
-
-#elif !defined __ASSEMBLER__
-
-# define SINGLE_THREAD_P (1)
-# define NO_CANCELLATION 1
-
-#endif
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c b/libpthread/nptl/sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c
deleted file mode 100644
index 172223af3..000000000
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c
+++ /dev/null
@@ -1 +0,0 @@
-#include "../x86_64/timer_create.c"
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c b/libpthread/nptl/sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c
deleted file mode 100644
index 537516e0a..000000000
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c
+++ /dev/null
@@ -1 +0,0 @@
-#include "../x86_64/timer_delete.c"
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c b/libpthread/nptl/sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c
deleted file mode 100644
index 3f21a73c9..000000000
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c
+++ /dev/null
@@ -1 +0,0 @@
-#include "../x86_64/timer_getoverr.c"
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c b/libpthread/nptl/sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c
deleted file mode 100644
index a50143adc..000000000
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c
+++ /dev/null
@@ -1 +0,0 @@
-#include "../x86_64/timer_gettime.c"
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c b/libpthread/nptl/sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c
deleted file mode 100644
index 37baeffac..000000000
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c
+++ /dev/null
@@ -1 +0,0 @@
-#include "../x86_64/timer_settime.c"
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/s390/s390-64/vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/s390/s390-64/vfork.S
deleted file mode 100644
index f43e9c34b..000000000
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/s390/s390-64/vfork.S
+++ /dev/null
@@ -1,59 +0,0 @@
-/* Copyright (C) 2004 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Jakub Jelinek <jakub@redhat.com>, 2004.
-
- 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>
-#define _ERRNO_H 1
-#include <bits/errno.h>
-#include <kernel-features.h>
-#include <bits/wordsize.h>
-#include <tcb-offsets.h>
-
-/* 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. */
-
-ENTRY (__vfork)
-
- ear %r4,%a0
- sllg %r4,%r4,32
- ear %r4,%a1
- icm %r3,15,PID(%r4)
- llilh %r1,32768
- je 1f
- lcr %r1,%r3
-1: st %r1,PID(%r4)
-
- /* Do vfork system call. */
- svc SYS_ify (vfork)
-
- ltgr %r2,%r2
- je 1f
- st %r3,PID(%r4)
-1:
- /* Check for error. */
- lghi %r4,-4095
- clgr %r2,%r4
- jgnl SYSCALL_ERROR_LABEL
-
- /* Normal return. */
- br %r14
-PSEUDO_END(__vfork)
-libc_hidden_def (__vfork)
-weak_alias (__vfork, vfork)