summaryrefslogtreecommitdiff
path: root/libpthread/linuxthreads.old/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'libpthread/linuxthreads.old/sysdeps')
-rw-r--r--libpthread/linuxthreads.old/sysdeps/alpha/pt-machine.h127
-rw-r--r--libpthread/linuxthreads.old/sysdeps/arm/pt-machine.h69
-rw-r--r--libpthread/linuxthreads.old/sysdeps/avr32/pt-machine.h73
-rw-r--r--libpthread/linuxthreads.old/sysdeps/bfin/pt-machine.h76
-rw-r--r--libpthread/linuxthreads.old/sysdeps/cris/pt-machine.h70
-rw-r--r--libpthread/linuxthreads.old/sysdeps/frv/pt-machine.h70
-rw-r--r--libpthread/linuxthreads.old/sysdeps/h8300/pt-machine.h58
-rw-r--r--libpthread/linuxthreads.old/sysdeps/i386/pt-machine.h147
-rw-r--r--libpthread/linuxthreads.old/sysdeps/i386/tls.h185
-rw-r--r--libpthread/linuxthreads.old/sysdeps/i386/useldt.h307
-rw-r--r--libpthread/linuxthreads.old/sysdeps/ia64/pt-machine.h135
-rw-r--r--libpthread/linuxthreads.old/sysdeps/ia64/tls.h139
-rw-r--r--libpthread/linuxthreads.old/sysdeps/m68k/pt-machine.h75
-rw-r--r--libpthread/linuxthreads.old/sysdeps/mips/pt-machine.h106
-rw-r--r--libpthread/linuxthreads.old/sysdeps/nios/pt-machine.h68
-rw-r--r--libpthread/linuxthreads.old/sysdeps/nios2/pt-machine.h58
-rw-r--r--libpthread/linuxthreads.old/sysdeps/powerpc/pt-machine.h102
-rw-r--r--libpthread/linuxthreads.old/sysdeps/pthread/bits/libc-lock.h416
-rw-r--r--libpthread/linuxthreads.old/sysdeps/pthread/bits/libc-tsd.h73
-rw-r--r--libpthread/linuxthreads.old/sysdeps/pthread/bits/pthreadtypes.h142
-rw-r--r--libpthread/linuxthreads.old/sysdeps/pthread/pthread-functions.h98
-rw-r--r--libpthread/linuxthreads.old/sysdeps/pthread/pthread.h702
-rw-r--r--libpthread/linuxthreads.old/sysdeps/pthread/tls.h81
-rw-r--r--libpthread/linuxthreads.old/sysdeps/sh/pt-machine.h82
-rw-r--r--libpthread/linuxthreads.old/sysdeps/sh/tls.h117
-rw-r--r--libpthread/linuxthreads.old/sysdeps/sh64/Makefile.arch30
-rw-r--r--libpthread/linuxthreads.old/sysdeps/sh64/pt-machine.c47
-rw-r--r--libpthread/linuxthreads.old/sysdeps/sh64/pt-machine.h39
-rw-r--r--libpthread/linuxthreads.old/sysdeps/sparc/pt-machine.h8
-rw-r--r--libpthread/linuxthreads.old/sysdeps/sparc/sparc32/pt-machine.h83
-rw-r--r--libpthread/linuxthreads.old/sysdeps/sparc/sparc64/pt-machine.h105
-rw-r--r--libpthread/linuxthreads.old/sysdeps/v850/pt-machine.h52
-rw-r--r--libpthread/linuxthreads.old/sysdeps/x86_64/pt-machine.h85
-rw-r--r--libpthread/linuxthreads.old/sysdeps/x86_64/tls.h134
-rw-r--r--libpthread/linuxthreads.old/sysdeps/xtensa/pt-machine.h48
35 files changed, 0 insertions, 4207 deletions
diff --git a/libpthread/linuxthreads.old/sysdeps/alpha/pt-machine.h b/libpthread/linuxthreads.old/sysdeps/alpha/pt-machine.h
deleted file mode 100644
index 97c38394b..000000000
--- a/libpthread/linuxthreads.old/sysdeps/alpha/pt-machine.h
+++ /dev/null
@@ -1,127 +0,0 @@
-/* Machine-dependent pthreads configuration and inline functions.
- Alpha version.
- Copyright (C) 1996, 1997, 1998, 2000, 2002, 2003
- Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Richard Henderson <rth@tamu.edu>.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation; either version 2.1 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef _PT_MACHINE_H
-#define _PT_MACHINE_H 1
-
-#include <features.h>
-
-#ifndef PT_EI
-# define PT_EI __extern_always_inline
-#endif
-
-#ifdef __linux__
-# include <asm/pal.h>
-#else
-# include <machine/pal.h>
-#endif
-
-/* Get some notion of the current stack. Need not be exactly the top
- of the stack, just something somewhere in the current frame. */
-#define CURRENT_STACK_FRAME stack_pointer
-register char *stack_pointer __asm__("$30");
-
-
-/* Memory barrier; default is to do nothing */
-#define MEMORY_BARRIER() __asm__ __volatile__("mb" : : : "memory")
-/* Write barrier. */
-#define WRITE_MEMORY_BARRIER() __asm__ __volatile__("wmb" : : : "memory")
-
-
-/* Spinlock implementation; required. */
-PT_EI long int
-testandset (int *spinlock)
-{
- long int ret, temp;
-
- __asm__ __volatile__(
- "/* Inline spinlock test & set */\n"
- "1:\t"
- "ldl_l %0,%3\n\t"
- "bne %0,2f\n\t"
- "or $31,1,%1\n\t"
- "stl_c %1,%2\n\t"
- "beq %1,1b\n"
- "2:\tmb\n"
- "/* End spinlock test & set */"
- : "=&r"(ret), "=&r"(temp), "=m"(*spinlock)
- : "m"(*spinlock)
- : "memory");
-
- return ret;
-}
-
-
-/* Begin allocating thread stacks at this address. Default is to allocate
- them just below the initial program stack. */
-#define THREAD_STACK_START_ADDRESS 0x40000000000
-
-
-/* Return the thread descriptor for the current thread. */
-#define THREAD_SELF \
-({ \
- register pthread_descr __self __asm__("$0"); \
- __asm__ ("call_pal %1" : "=r"(__self) : "i"(PAL_rduniq)); \
- __self; \
-})
-
-/* Initialize the thread-unique value. */
-#define INIT_THREAD_SELF(descr, nr) \
-{ \
- register pthread_descr __self __asm__("$16") = (descr); \
- __asm__ __volatile__ ("call_pal %1" : : "r"(__self), "i"(PAL_wruniq)); \
-}
-
-
-/* Compare-and-swap for semaphores. */
-
-#define HAS_COMPARE_AND_SWAP
-PT_EI int
-__compare_and_swap (long int *p, long int oldval, long int newval)
-{
- long int ret;
-
- __asm__ __volatile__ (
- "/* Inline compare & swap */\n"
- "1:\t"
- "ldq_l %0,%4\n\t"
- "cmpeq %0,%2,%0\n\t"
- "beq %0,2f\n\t"
- "mov %3,%0\n\t"
- "stq_c %0,%1\n\t"
- "beq %0,1b\n\t"
- "2:\tmb\n"
- "/* End compare & swap */"
- : "=&r"(ret), "=m"(*p)
- : "r"(oldval), "r"(newval), "m"(*p)
- : "memory");
-
- return ret;
-}
-
-/* We want the OS to assign stack addresses. */
-#define FLOATING_STACKS 1
-
-/* Maximum size of the stack if the rlimit is unlimited. */
-#define ARCH_STACK_MAX_SIZE 32*1024*1024
-
-#endif /* pt-machine.h */
diff --git a/libpthread/linuxthreads.old/sysdeps/arm/pt-machine.h b/libpthread/linuxthreads.old/sysdeps/arm/pt-machine.h
deleted file mode 100644
index 583eb6875..000000000
--- a/libpthread/linuxthreads.old/sysdeps/arm/pt-machine.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/* Machine-dependent pthreads configuration and inline functions.
- ARM version.
- Copyright (C) 1997, 1998, 2000, 2002 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Philip Blundell <philb@gnu.org>.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation; either version 2.1 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef _PT_MACHINE_H
-#define _PT_MACHINE_H 1
-
-#include <features.h>
-
-#ifndef PT_EI
-# define PT_EI __extern_always_inline
-#endif
-
-/* This will not work on ARM1 or ARM2 because SWP is lacking on those
- machines. Unfortunately we have no way to detect this at compile
- time; let's hope nobody tries to use one. */
-
-/* Spinlock implementation; required. */
-PT_EI long int testandset (int *spinlock);
-PT_EI long int testandset (int *spinlock)
-{
- register unsigned int ret;
-
-#if defined(__thumb__)
- void *pc;
- __asm__ __volatile__(
- ".align 0\n"
- "\tbx pc\n"
- "\tnop\n"
- "\t.arm\n"
- "\tswp %0, %2, [%3]\n"
- "\torr %1, pc, #1\n"
- "\tbx %1\n"
- "\t.force_thumb"
- : "=r"(ret), "=r"(pc)
- : "0"(1), "r"(spinlock));
-#else
- __asm__ __volatile__("swp %0, %1, [%2]"
- : "=r"(ret)
- : "0"(1), "r"(spinlock));
-#endif
-
- return ret;
-}
-
-
-/* Get some notion of the current stack. Need not be exactly the top
- of the stack, just something somewhere in the current frame. */
-#define CURRENT_STACK_FRAME stack_pointer
-register char * stack_pointer __asm__ ("sp");
-
-#endif /* pt-machine.h */
diff --git a/libpthread/linuxthreads.old/sysdeps/avr32/pt-machine.h b/libpthread/linuxthreads.old/sysdeps/avr32/pt-machine.h
deleted file mode 100644
index 5735d0ea2..000000000
--- a/libpthread/linuxthreads.old/sysdeps/avr32/pt-machine.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/* Machine-dependent pthreads configuration and inline functions.
- *
- * Copyright (C) 2005-2007 Atmel Corporation
- *
- * This file is subject to the terms and conditions of the GNU Lesser General
- * Public License. See the file "COPYING.LIB" in the main directory of this
- * archive for more details.
- */
-#ifndef _PT_MACHINE_H
-#define _PT_MACHINE_H 1
-
-#include <features.h>
-
-#ifndef PT_EI
-# define PT_EI __extern_always_inline
-#endif
-
-static __inline__ int
-_test_and_set (int *p, int v)
-{
- int result;
-
- __asm__ __volatile__(
- "/* Inline test and set */\n"
- " xchg %[old], %[mem], %[new]"
- : [old] "=&r"(result)
- : [mem] "r"(p), [new] "r"(v)
- : "memory");
-
- return result;
-}
-
-extern long int testandset (int *spinlock);
-extern int __compare_and_swap (long int *p, long int oldval, long int newval);
-
-/* Spinlock implementation; required. */
-PT_EI long int
-testandset (int *spinlock)
-{
- return _test_and_set(spinlock, 1);
-}
-
-
-/* Get some notion of the current stack. Need not be exactly the top
- of the stack, just something somewhere in the current frame. */
-#define CURRENT_STACK_FRAME stack_pointer
-register char * stack_pointer __asm__ ("sp");
-
-/* Compare-and-swap for semaphores. */
-
-#define HAS_COMPARE_AND_SWAP
-PT_EI int
-__compare_and_swap(long int *p, long int oldval, long int newval)
-{
- long int result;
-
- __asm__ __volatile__(
- "/* Inline compare and swap */\n"
- "1: ssrf 5\n"
- " ld.w %[result], %[mem]\n"
- " eor %[result], %[old]\n"
- " brne 2f\n"
- " stcond %[mem], %[new]\n"
- " brne 1b\n"
- "2:"
- : [result] "=&r"(result), [mem] "=m"(*p)
- : "m"(*p), [new] "r"(newval), [old] "r"(oldval)
- : "cc", "memory");
-
- return result == 0;
-}
-
-#endif /* pt-machine.h */
diff --git a/libpthread/linuxthreads.old/sysdeps/bfin/pt-machine.h b/libpthread/linuxthreads.old/sysdeps/bfin/pt-machine.h
deleted file mode 100644
index e81ecffbe..000000000
--- a/libpthread/linuxthreads.old/sysdeps/bfin/pt-machine.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/* Machine-dependent pthreads configuration and inline functions.
- Copyright (C) 1996, 1998, 2000, 2002 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Richard Henderson <rth@tamu.edu>.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation; either version 2.1 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; see the file COPYING.LIB. If
- not, write to the Free Software Foundation, Inc.,
- 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#ifndef _PT_MACHINE_H
-#define _PT_MACHINE_H 1
-
-#include <features.h>
-
-#ifndef PT_EI
-# define PT_EI __extern_always_inline
-#endif
-
-#include <asm/fixed_code.h>
-
-/* Spinlock implementation; required. */
-/* The semantics of the TESTSET instruction cannot be guaranteed. We cannot
- easily move all locks used by linux kernel to non-cacheable memory.
- EXCPT 0x4 is used to trap into kernel to do the atomic testandset.
- It's ugly. But it's the only thing we can do now.
- The handler of EXCPT 0x4 expects the address of the lock is passed through
- R0. And the result is returned by R0. */
-PT_EI long int
-testandset (int *spinlock)
-{
- long int res;
-
- __asm__ __volatile__ (
- "CALL (%4);"
- : "=q0" (res), "=m" (*spinlock)
- : "qA" (spinlock), "m" (*spinlock), "a" (ATOMIC_XCHG32), "q1" (1)
- : "RETS", "cc", "memory");
-
- return res;
-}
-
-#define HAS_COMPARE_AND_SWAP
-PT_EI int
-__compare_and_swap (long int *p, long int oldval, long int newval)
-{
- long int readval;
- __asm__ __volatile__ (
- "CALL (%5);"
- : "=q0" (readval), "=m" (*p)
- : "qA" (p),
- "q1" (oldval),
- "q2" (newval),
- "a" (ATOMIC_CAS32),
- "m" (*p)
- : "RETS", "memory", "cc");
- return readval == oldval;
-}
-
-#ifdef SHARED
-# define PTHREAD_STATIC_FN_REQUIRE(name)
-#else
-# define PTHREAD_STATIC_FN_REQUIRE(name) __asm__ (".globl " "_"#name);
-#endif
-
-#endif /* pt-machine.h */
diff --git a/libpthread/linuxthreads.old/sysdeps/cris/pt-machine.h b/libpthread/linuxthreads.old/sysdeps/cris/pt-machine.h
deleted file mode 100644
index 6d626fb4b..000000000
--- a/libpthread/linuxthreads.old/sysdeps/cris/pt-machine.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/* Machine-dependent pthreads configuration and inline functions.
- CRIS version.
- Copyright (C) 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.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-#ifndef _PT_MACHINE_H
-#define _PT_MACHINE_H 1
-
-#include <features.h>
-
-#ifndef PT_EI
-# define PT_EI __extern_always_inline
-#endif
-
-PT_EI long int
-testandset (int *spinlock)
-{
- register unsigned long int ret;
-
- /* Note the use of a dummy output of *spinlock to expose the write. The
- memory barrier is to stop *other* writes being moved past this code. */
-
-#ifdef __arch_v32
- __asm__ __volatile__("clearf p\n"
- "0:\n\t"
- "movu.b [%2],%0\n\t"
- "ax\n\t"
- "move.b %3,[%2]\n\t"
- "bcs 0b\n\t"
- "clearf p"
- : "=&r" (ret), "=m" (*spinlock)
- : "r" (spinlock), "r" ((int) 1), "m" (*spinlock)
- : "memory");
-#else /* not __arch_v32 */
- __asm__ __volatile__("clearf\n"
- "0:\n\t"
- "movu.b [%2],%0\n\t"
- "ax\n\t"
- "move.b %3,[%2]\n\t"
- "bwf 0b\n\t"
- "clearf"
- : "=&r" (ret), "=m" (*spinlock)
- : "r" (spinlock), "r" ((int) 1), "m" (*spinlock)
- : "memory");
-#endif /* __arch_v32 */
- return ret;
-}
-
-
-/* Get some notion of the current stack. Need not be exactly the top
- of the stack, just something somewhere in the current frame.
- I don't trust register variables, so let's do this the safe way. */
-#define CURRENT_STACK_FRAME \
- ({ char *sp; __asm__ ("move.d $sp,%0" : "=rm" (sp)); sp; })
-
-#endif /* pt-machine.h */
diff --git a/libpthread/linuxthreads.old/sysdeps/frv/pt-machine.h b/libpthread/linuxthreads.old/sysdeps/frv/pt-machine.h
deleted file mode 100644
index 9c9d0d76a..000000000
--- a/libpthread/linuxthreads.old/sysdeps/frv/pt-machine.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/* Machine-dependent pthreads configuration and inline functions.
- FR-V version.
- Copyright (C) 2004 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Alexandre Oliva <aoliva@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. */
-
-#ifndef _PT_MACHINE_H
-#define _PT_MACHINE_H 1
-
-#include <features.h>
-
-#ifndef __ASSEMBLER__
-
-#ifndef PT_EI
-# define PT_EI __extern_always_inline
-#endif
-
-/* Spinlock implementation; required. */
-PT_EI long int
-testandset (int *spinlock)
-{
- int i = 1;
- __asm__ ("swap%I0 %M0, %1" : "+m"(*(volatile int *)spinlock), "+r"(i));
- return i;
-}
-
-/* We want the OS to assign stack addresses. */
-#define FLOATING_STACKS 1
-
-/* This symbol is defined by the ABI as the stack size requested by
- the main program. */
-extern char __stacksize;
-#define ARCH_STACK_MAX_SIZE ((unsigned long)&__stacksize)
-
-/* Memory barrier; default is to do nothing */
-#define MEMORY_BARRIER() __asm__ __volatile__("membar" : : : "memory")
-/* Write barrier. */
-#define WRITE_MEMORY_BARRIER() __asm__ __volatile__("membar" : : : "memory")
-
-/* Return the thread descriptor for the current thread. */
-register struct _pthread_descr_struct *THREAD_SELF __asm__ ("gr29");
-#define THREAD_SELF THREAD_SELF
-
-/* Initialize the thread-unique value. */
-#define INIT_THREAD_SELF(descr, nr) \
- (THREAD_SELF = descr)
-
-/* Get some notion of the current stack. Need not be exactly the top
- of the stack, just something somewhere in the current frame. */
-#define CURRENT_STACK_FRAME stack_pointer
-register char * stack_pointer __asm__ ("sp");
-
-#endif
-
-#endif /* pt-machine.h */
diff --git a/libpthread/linuxthreads.old/sysdeps/h8300/pt-machine.h b/libpthread/linuxthreads.old/sysdeps/h8300/pt-machine.h
deleted file mode 100644
index 121f496d7..000000000
--- a/libpthread/linuxthreads.old/sysdeps/h8300/pt-machine.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/* Machine-dependent pthreads configuration and inline functions.
- H8/300 version.
- Copyright (C) 1996, 1998, 2000, 2002 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Richard Henderson <rth@tamu.edu>.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation; either version 2.1 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; see the file COPYING.LIB. If
- not, write to the Free Software Foundation, Inc.,
- 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#ifndef _PT_MACHINE_H
-#define _PT_MACHINE_H 1
-
-#include <features.h>
-
-#ifndef PT_EI
-# define PT_EI __extern_always_inline
-#endif
-
-/* Spinlock implementation; required. */
-PT_EI long int
-testandset (int *spinlock)
-{
- char ret;
-
- __asm__ __volatile__(
- "sub.w %0,%0\n\t"
- "stc ccr,@-sp\n\t"
- "orc #0x80,ccr\n\t"
- "bld #0,@%2\n\t"
- "bset #0,@%2\n\t"
- "rotxl.w %0\n\t"
- "ldc @sp+,ccr\n\t"
- :"=r"(ret),"=m"(*spinlock)
- :"g"(spinlock)
- :"cc");
-
- return ret;
-}
-
-
-/* Get some notion of the current stack. Need not be exactly the top
- of the stack, just something somewhere in the current frame. */
-#define CURRENT_STACK_FRAME stack_pointer
-register char * stack_pointer __asm__ ("%sp");
-
-#endif /* pt-machine.h */
diff --git a/libpthread/linuxthreads.old/sysdeps/i386/pt-machine.h b/libpthread/linuxthreads.old/sysdeps/i386/pt-machine.h
deleted file mode 100644
index a6256c58f..000000000
--- a/libpthread/linuxthreads.old/sysdeps/i386/pt-machine.h
+++ /dev/null
@@ -1,147 +0,0 @@
-/* Machine-dependent pthreads configuration and inline functions.
- i386 version.
- Copyright (C) 1996-2001, 2002, 2003 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Richard Henderson <rth@tamu.edu>.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation; either version 2.1 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef _PT_MACHINE_H
-#define _PT_MACHINE_H 1
-
-#include <features.h>
-
-#ifndef __ASSEMBLER__
-#ifndef PT_EI
-# define PT_EI __extern_always_inline __attribute__((visibility("hidden")))
-#endif
-
-extern long int testandset (int *spinlock);
-extern int __compare_and_swap (long int *p, long int oldval, long int newval);
-
-/* Get some notion of the current stack. Need not be exactly the top
- of the stack, just something somewhere in the current frame. */
-#define CURRENT_STACK_FRAME __builtin_frame_address (0)
-
-
-/* See if we can optimize for newer cpus... */
-#if defined __GNUC__ && __GNUC__ >= 2 && \
- (defined __i486__ || defined __pentium__ || defined __pentiumpro__ || defined __pentium4__ || \
- defined __athlon__ || defined __k8__)
-
-/* Spinlock implementation; required. */
-PT_EI long int
-testandset (int *spinlock)
-{
- long int ret;
-
- __asm__ __volatile__ (
- "xchgl %0, %1"
- : "=r" (ret), "=m" (*spinlock)
- : "0" (1), "m" (*spinlock)
- : "memory");
-
- return ret;
-}
-
-/* Compare-and-swap for semaphores. It's always available on i686. */
-#define HAS_COMPARE_AND_SWAP
-
-PT_EI int
-__compare_and_swap (long int *p, long int oldval, long int newval)
-{
- char ret;
- long int readval;
-
- __asm__ __volatile__ ("lock; cmpxchgl %3, %1; sete %0"
- : "=q" (ret), "=m" (*p), "=a" (readval)
- : "r" (newval), "m" (*p), "a" (oldval)
- : "memory");
- return ret;
-}
-
-#if defined(__ASSUME_LDT_WORKS) && __ASSUME_LDT_WORKS > 0
-#include "useldt.h"
-#endif
-
-/* The P4 and above really want some help to prevent overheating. */
-#define BUSY_WAIT_NOP __asm__ ("rep; nop")
-
-
-#else /* Generic i386 implementation */
-
-extern int compare_and_swap_is_available (void);
-
-/* Spinlock implementation; required. */
-PT_EI long int
-testandset (int *spinlock)
-{
- long int ret;
-
- __asm__ __volatile__(
- "xchgl %0, %1"
- : "=r"(ret), "=m"(*spinlock)
- : "0"(1), "m"(*spinlock)
- : "memory");
-
- return ret;
-}
-
-
-/* Compare-and-swap for semaphores.
- Available on the 486 and above, but not on the 386.
- We test dynamically whether it's available or not. */
-
-#define HAS_COMPARE_AND_SWAP
-#define TEST_FOR_COMPARE_AND_SWAP
-
-PT_EI int
-__compare_and_swap (long int *p, long int oldval, long int newval)
-{
- char ret;
- long int readval;
-
- __asm__ __volatile__ ("lock; cmpxchgl %3, %1; sete %0"
- : "=q" (ret), "=m" (*p), "=a" (readval)
- : "r" (newval), "m" (*p), "a" (oldval)
- : "memory");
- return ret;
-}
-
-PT_EI int
-compare_and_swap_is_available (void)
-{
- int changed;
- int oldflags;
- /* get EFLAGS */
- __asm__ __volatile__ ("pushfl; popl %0" : "=r" (oldflags) : );
- /* Flip AC bit in EFLAGS. */
- __asm__ __volatile__ ("pushl %0; popfl" : : "r" (oldflags ^ 0x40000) : "cc");
- /* reread EFLAGS */
- __asm__ __volatile__ ("pushfl; popl %0" : "=r" (changed) : );
- /* See if bit changed. */
- changed = (changed ^ oldflags) & 0x40000;
- /* Restore EFLAGS. */
- __asm__ __volatile__ ("pushl %0; popfl" : : "r" (oldflags) : "cc");
- /* If the AC flag did not change, it's a 386 and it lacks cmpxchg.
- Otherwise, it's a 486 or above and it has cmpxchg. */
- return changed != 0;
-}
-#endif /* Generic i386 implementation */
-
-#endif /* __ASSEMBLER__ */
-
-#endif /* pt-machine.h */
diff --git a/libpthread/linuxthreads.old/sysdeps/i386/tls.h b/libpthread/linuxthreads.old/sysdeps/i386/tls.h
deleted file mode 100644
index 8534cab80..000000000
--- a/libpthread/linuxthreads.old/sysdeps/i386/tls.h
+++ /dev/null
@@ -1,185 +0,0 @@
-/* Definition for thread-local data handling. linuxthreads/i386 version.
- Copyright (C) 2002, 2003, 2004, 2005 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 _TLS_H
-#define _TLS_H
-
-# include <pt-machine.h>
-
-#ifndef __ASSEMBLER__
-# include <stdbool.h>
-# include <stddef.h>
-# include <stdint.h>
-
-/* Type for the dtv. */
-typedef union dtv
-{
- size_t counter;
- void *pointer;
-} dtv_t;
-
-
-typedef struct
-{
- void *tcb; /* Pointer to the TCB. Not necessary the
- thread descriptor used by libpthread. */
- dtv_t *dt