summaryrefslogtreecommitdiff
path: root/libc/nptl
diff options
context:
space:
mode:
authorjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2012-02-08 16:44:31 +0000
committerjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2012-02-08 16:44:31 +0000
commit78be84cd747c2e3965bf6c2fd5f702d6ff2f5525 (patch)
treec070a60ef7c5371bef8b7a559442a6920b394c8e /libc/nptl
parentde06548e980675e65a1e6d850bb8c3a3f7ec638d (diff)
Merge changes between r16568 and r17050 from /fsf/trunk.
git-svn-id: svn://svn.eglibc.org/trunk@17051 7b3dc134-2b1b-0410-93df-9e9f96275f8d
Diffstat (limited to 'libc/nptl')
-rw-r--r--libc/nptl/ChangeLog66
-rw-r--r--libc/nptl/Makefile26
-rw-r--r--libc/nptl/forward.c21
-rw-r--r--libc/nptl/pt-crti.S44
-rw-r--r--libc/nptl/pthreadP.h14
-rw-r--r--libc/nptl/semaphore.h8
-rw-r--r--libc/nptl/shlib-versions4
-rw-r--r--libc/nptl/sysdeps/ia64/Makefile25
-rw-r--r--libc/nptl/sysdeps/ia64/pthread_spin_lock.c36
-rw-r--r--libc/nptl/sysdeps/ia64/pthread_spin_trylock.c28
-rw-r--r--libc/nptl/sysdeps/ia64/pthread_spin_unlock.c28
-rw-r--r--libc/nptl/sysdeps/ia64/pthreaddef.h43
-rw-r--r--libc/nptl/sysdeps/ia64/tcb-offsets.sym7
-rw-r--r--libc/nptl/sysdeps/ia64/tls.h186
-rw-r--r--libc/nptl/sysdeps/pthread/bits/libc-lock.h20
-rw-r--r--libc/nptl/sysdeps/pthread/bits/sigthread.h4
-rw-r--r--libc/nptl/sysdeps/pthread/pthread-functions.h4
-rw-r--r--libc/nptl/sysdeps/pthread/pthread.h87
-rw-r--r--libc/nptl/sysdeps/unix/sysv/linux/aio_misc.h4
-rw-r--r--libc/nptl/sysdeps/unix/sysv/linux/i386/Makefile3
-rw-r--r--libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S14
-rw-r--r--libc/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_post.S19
-rw-r--r--libc/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S4
-rw-r--r--libc/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S16
-rw-r--r--libc/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_wait.S6
-rw-r--r--libc/nptl/sysdeps/unix/sysv/linux/i386/pthread_once.S17
-rw-r--r--libc/nptl/sysdeps/unix/sysv/linux/ia64/Makefile3
-rw-r--r--libc/nptl/sysdeps/unix/sysv/linux/ia64/Versions13
-rw-r--r--libc/nptl/sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S159
-rw-r--r--libc/nptl/sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c168
-rw-r--r--libc/nptl/sysdeps/unix/sysv/linux/ia64/bits/local_lim.h100
-rw-r--r--libc/nptl/sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h169
-rw-r--r--libc/nptl/sysdeps/unix/sysv/linux/ia64/bits/semaphore.h36
-rw-r--r--libc/nptl/sysdeps/unix/sysv/linux/ia64/clone2.S9
-rw-r--r--libc/nptl/sysdeps/unix/sysv/linux/ia64/createthread.c26
-rw-r--r--libc/nptl/sysdeps/unix/sysv/linux/ia64/dl-sysdep.h77
-rw-r--r--libc/nptl/sysdeps/unix/sysv/linux/ia64/fork.c31
-rw-r--r--libc/nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h295
-rw-r--r--libc/nptl/sysdeps/unix/sysv/linux/ia64/pt-initfini.c50
-rw-r--r--libc/nptl/sysdeps/unix/sysv/linux/ia64/pt-vfork.S60
-rw-r--r--libc/nptl/sysdeps/unix/sysv/linux/ia64/pthread_once.c94
-rw-r--r--libc/nptl/sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h205
-rw-r--r--libc/nptl/sysdeps/unix/sysv/linux/ia64/timer_create.c1
-rw-r--r--libc/nptl/sysdeps/unix/sysv/linux/ia64/timer_delete.c1
-rw-r--r--libc/nptl/sysdeps/unix/sysv/linux/ia64/timer_getoverr.c1
-rw-r--r--libc/nptl/sysdeps/unix/sysv/linux/ia64/timer_gettime.c1
-rw-r--r--libc/nptl/sysdeps/unix/sysv/linux/ia64/timer_settime.c1
-rw-r--r--libc/nptl/sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c39
-rw-r--r--libc/nptl/sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c44
-rw-r--r--libc/nptl/sysdeps/unix/sysv/linux/ia64/vfork.S69
-rw-r--r--libc/nptl/sysdeps/unix/sysv/linux/mq_notify.c1
51 files changed, 233 insertions, 2154 deletions
diff --git a/libc/nptl/ChangeLog b/libc/nptl/ChangeLog
index e8ff69ab0..8ff14a9f2 100644
--- a/libc/nptl/ChangeLog
+++ b/libc/nptl/ChangeLog
@@ -1,3 +1,69 @@
+2012-02-08 Joseph Myers <joseph@codesourcery.com>
+
+ Support crti.S and crtn.S provided directly by architectures.
+ * Makefile [crti.S in sysdirs] (omit-deps): Do not append.
+ [crti.S in sysdirs] (CFLAGS-pt-initfini.s): Do not define variable.
+ [crti.S in sysdirs] ($(objpfx)pt-initfini.s): Disable rule.
+ [crti.S in sysdirs] ($(objpfx)crti.S): Likewise.
+ [crti.S in sysdirs] ($(objpfx)crtn.S): Likewise.
+ [crti.S in sysdirs] ($(objpfx)defs.h): Likewise.
+ [crti.S in sysdirs] ($(objpfx)crti.o): Likewise.
+ [crti.S in sysdirs] ($(objpfx)crtn.o): Likewise.
+ [crti.S in sysdirs] (pt-initfini.c): Remove vpath directive.
+ [crti.S in sysdirs] ($(objpfx)crti.o): New rule.
+ * pt-crti.S: New file.
+ * sysdeps/unix/sysv/linux/i386/Makefile: Remove file.
+
+2012-02-03 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
+ macros for PIC register setup.
+ * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
+ * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
+ * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
+ * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
+ * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
+
+2012-01-11 Marek Polacek <polacek@redhat.com>
+
+ * forward.c (FORWARD_NORETURN): Define macro.
+ (__pthread_unwind): Use FORWARD_NORETURN macro to avoid warning.
+ (__pthread_exit): Likewise.
+
+2012-01-10 Ulrich Drepper <drepper@gmail.com>
+
+ * sysdeps/pthread/pthread.h: Add const attribute to pthread_equal.
+
+ * pthreadP.h: Add noreturn to __pthread_exit.
+ * sysdeps/pthread/pthread-functions.h: Likewise for ptr___pthread_exit.
+
+2011-12-30 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
+
+ * sysdeps/unix/sysv/linux/aio_misc.h (__aio_create_helper_thread):
+ Call pthread_attr_setstacksize() with result of
+ __pthread_get_minstack() to account for application TLS usage.
+
+2012-01-08 Marek Polacek <polacek@redhat.com>
+
+ * sysdeps/unix/sysv/linux/mq_notify.c: Include <nptl/pthreadP.h>.
+
+2012-01-07 Ulrich Drepper <drepper@gmail.com>
+
+ [BZ #13553]
+ * pthreadP.h: Use const instead of __const.
+ * semaphore.h: Likewise.
+ * sysdeps/pthread/bits/libc-lock.h: Likewise.
+ * sysdeps/pthread/bits/sigthread.h: Likewise.
+ * sysdeps/pthread/pthread.h: Likewise.
+
+ * Makefile: Remove elf=yes test, only ELF is supported.
+
+ * shlib-versions: Remove entries for ports architectures.
+
+ In case anyone cares, the IA-64 architecture could move to ports.
+ * sysdeps/ia64/*: Removed.
+ * sysdeps/unix/sysv/linux/ia64/*: Removed.
+
2011-12-22 Ulrich Drepper <drepper@gmail.com>
* sysdeps/pthread/gai_misc.h (__gai_create_helper_thread): Use
diff --git a/libc/nptl/Makefile b/libc/nptl/Makefile
index c9d7a3f38..83483c539 100644
--- a/libc/nptl/Makefile
+++ b/libc/nptl/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2008,2009,2010 Free Software Foundation, Inc.
+# Copyright (C) 2002-2008,2009,2010,2012 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
@@ -354,15 +354,23 @@ ifneq (,$(patsubst .,,$(multidir)))
generated-dirs := $(firstword $(subst /, , $(multidir)))
crti-objs += $(multidir)/crti.o
crtn-objs += $(multidir)/crtn.o
+# Conditionals on the existence of a sysdeps version of crti.S are
+# temporary until all targets either have such a file or have been
+# removed, after which the old approach of postprocessing compiler
+# output will be removed.
+ifeq (,$(wildcard $(sysdirs:%=%/crti.S)))
omit-deps += $(multidir)/crti $(multidir)/crtn
+endif
$(objpfx)$(multidir):
mkdir -p $@
endif
extra-objs += $(crti-objs) $(crtn-objs)
+ifeq (,$(wildcard $(sysdirs:%=%/crti.S)))
omit-deps += crti crtn
CFLAGS-pt-initfini.s = -g0 -fPIC -fno-inline-functions $(fno-unit-at-a-time)
endif
+endif
CFLAGS-flockfile.c = -D_IO_MTSAFE_IO
CFLAGS-ftrylockfile.c = -D_IO_MTSAFE_IO
@@ -371,11 +379,10 @@ CFLAGS-funlockfile.c = -D_IO_MTSAFE_IO
link-libc-static := $(common-objpfx)libc.a $(static-gnulib) \
$(common-objpfx)libc.a
-ifeq ($(build-static),yes)
tests-static += tst-locale1 tst-locale2 tst-stackguard1-static
tests += tst-stackguard1-static
xtests-static += tst-setuid1-static
-endif
+
# These tests are linked with libc before libpthread
tests-reverse += tst-cancel5 tst-cancel23 tst-vfork1x tst-vfork2x
@@ -539,7 +546,7 @@ $(objpfx)libpthread.so: +postinit += $(addprefix $(objpfx),$(crtn-objs))
# Depend on ld.so too to get proper versions of ld.so symbols.
$(objpfx)libpthread.so: $(common-objpfx)libc.so \
$(common-objpfx)libc_nonshared.a \
- $(if $(filter yes,$(elf)), $(elfobjdir)/ld.so)
+ $(elfobjdir)/ld.so
# Make sure we link with the thread library.
ifeq ($(build-shared),yes)
@@ -563,15 +570,24 @@ $(addprefix $(objpfx),$(tests) $(test-srcs)): $(objpfx)libpthread.a
endif
ifeq ($(build-shared),yes)
+ifeq (,$(wildcard $(sysdirs:%=%/crti.S)))
vpath pt-initfini.c $(sysdirs)
$(objpfx)pt-initfini.s: pt-initfini.c
$(compile.c) -S $(CFLAGS-pt-initfini.s) -finhibit-size-directive \
$(patsubst -f%,-fno-%,$(exceptions)) -o $@
+endif
$(objpfx)tst-cleanup0.out: /dev/null $(objpfx)tst-cleanup0
$(make-test-out) 2>&1 | cmp - tst-cleanup0.expect > $@
+ifneq (,$(wildcard $(sysdirs:%=%/crti.S)))
+
+$(objpfx)crti.o: $(objpfx)pt-crti.o
+ ln -f $< $@
+
+else
+
# We only have one kind of startup code files. Static binaries and
# shared libraries are build using the PIC version.
$(objpfx)crti.S: $(objpfx)pt-initfini.s
@@ -593,6 +609,8 @@ $(objpfx)crti.o: $(objpfx)crti.S $(objpfx)defs.h
$(objpfx)crtn.o: $(objpfx)crtn.S $(objpfx)defs.h
$(compile.S) -g0 $(ASFLAGS-.os) -o $@
+endif
+
ifneq ($(multidir),.)
$(objpfx)$(multidir)/crti.o: $(objpfx)crti.o $(objpfx)$(multidir)/
ln -f $< $@
diff --git a/libc/nptl/forward.c b/libc/nptl/forward.c
index b62efd86f..18e190138 100644
--- a/libc/nptl/forward.c
+++ b/libc/nptl/forward.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2004, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2004, 2007, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
@@ -42,6 +42,17 @@ name decl \
return PTHFCT_CALL (ptr_##name, params); \
}
+/* Same as FORWARD2, only without return. */
+#define FORWARD_NORETURN(name, rettype, decl, params, defaction) \
+rettype \
+name decl \
+{ \
+ if (!__libc_pthread_functions_init) \
+ defaction; \
+ \
+ PTHFCT_CALL (ptr_##name, params); \
+}
+
#define FORWARD(name, decl, params, defretval) \
FORWARD2 (name, int, decl, params, return defretval)
@@ -160,8 +171,8 @@ FORWARD (pthread_equal, (pthread_t thread1, pthread_t thread2),
(thread1, thread2), 1)
-/* Use an alias to avoid warning, as pthread_exit is declared noreturn. */
-FORWARD2 (__pthread_exit, void, (void *retval), (retval), exit (EXIT_SUCCESS))
+FORWARD_NORETURN (__pthread_exit, void, (void *retval), (retval),
+ exit (EXIT_SUCCESS))
strong_alias (__pthread_exit, pthread_exit);
@@ -192,8 +203,7 @@ FORWARD (pthread_setcancelstate, (int state, int *oldstate), (state, oldstate),
FORWARD (pthread_setcanceltype, (int type, int *oldtype), (type, oldtype), 0)
-#define return /* value is void */
-FORWARD2(__pthread_unwind,
+FORWARD_NORETURN(__pthread_unwind,
void attribute_hidden __attribute ((noreturn)) __cleanup_fct_attribute
attribute_compat_text_section,
(__pthread_unwind_buf_t *buf), (buf), {
@@ -201,4 +211,3 @@ FORWARD2(__pthread_unwind,
INTERNAL_SYSCALL_DECL (err);
INTERNAL_SYSCALL (kill, err, 1, SIGKILL);
})
-#undef return
diff --git a/libc/nptl/pt-crti.S b/libc/nptl/pt-crti.S
new file mode 100644
index 000000000..3ea359d7d
--- /dev/null
+++ b/libc/nptl/pt-crti.S
@@ -0,0 +1,44 @@
+/* Special .init and .fini section support for libpthread.
+ Copyright (C) 2012 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 GNU 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.)
+
+ Note that people who make modified versions of this file are not
+ obligated to grant this special exception for their modified
+ versions; it is their choice whether to do so. The GNU Lesser
+ General Public License gives permission to release a modified
+ version without this exception; this exception also makes it
+ possible to release a modified version which carries forward this
+ exception.
+
+ 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. */
+
+/* Arrange for __pthread_initialize_minimal_internal to be called at
+ libpthread startup, instead of conditionally calling
+ __gmon_start__. */
+
+#define PREINIT_FUNCTION __pthread_initialize_minimal_internal
+#define PREINIT_FUNCTION_WEAK 0
+
+#include <crti.S>
diff --git a/libc/nptl/pthreadP.h b/libc/nptl/pthreadP.h
index 845434e50..df2a47831 100644
--- a/libc/nptl/pthreadP.h
+++ b/libc/nptl/pthreadP.h
@@ -406,9 +406,9 @@ extern int __pthread_setschedparam (pthread_t thread_id, int policy,
const struct sched_param *param);
extern int __pthread_setcancelstate (int state, int *oldstate);
extern int __pthread_mutex_init (pthread_mutex_t *__mutex,
- __const pthread_mutexattr_t *__mutexattr);
+ const pthread_mutexattr_t *__mutexattr);
extern int __pthread_mutex_init_internal (pthread_mutex_t *__mutex,
- __const pthread_mutexattr_t *__mutexattr)
+ const pthread_mutexattr_t *__mutexattr)
attribute_hidden;
extern int __pthread_mutex_destroy (pthread_mutex_t *__mutex);
extern int __pthread_mutex_destroy_internal (pthread_mutex_t *__mutex)
@@ -447,22 +447,22 @@ extern int __pthread_attr_getschedpolicy (const pthread_attr_t *attr,
extern int __pthread_attr_setschedpolicy (pthread_attr_t *attr, int policy);
extern int __pthread_attr_getscope (const pthread_attr_t *attr, int *scope);
extern int __pthread_attr_setscope (pthread_attr_t *attr, int scope);
-extern int __pthread_attr_getstackaddr (__const pthread_attr_t *__restrict
+extern int __pthread_attr_getstackaddr (const pthread_attr_t *__restrict
__attr, void **__restrict __stackaddr);
extern int __pthread_attr_setstackaddr (pthread_attr_t *__attr,
void *__stackaddr);
-extern int __pthread_attr_getstacksize (__const pthread_attr_t *__restrict
+extern int __pthread_attr_getstacksize (const pthread_attr_t *__restrict
__attr,
size_t *__restrict __stacksize);
extern int __pthread_attr_setstacksize (pthread_attr_t *__attr,
size_t __stacksize);
-extern int __pthread_attr_getstack (__const pthread_attr_t *__restrict __attr,
+extern int __pthread_attr_getstack (const pthread_attr_t *__restrict __attr,
void **__restrict __stackaddr,
size_t *__restrict __stacksize);
extern int __pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr,
size_t __stacksize);
extern int __pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock,
- __const pthread_rwlockattr_t *__restrict
+ const pthread_rwlockattr_t *__restrict
__attr);
extern int __pthread_rwlock_destroy (pthread_rwlock_t *__rwlock);
extern int __pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock);
@@ -501,7 +501,7 @@ extern int __pthread_atfork (void (*prepare) (void), void (*parent) (void),
extern pthread_t __pthread_self (void);
extern int __pthread_equal (pthread_t thread1, pthread_t thread2);
extern int __pthread_kill (pthread_t threadid, int signo);
-extern void __pthread_exit (void *value);
+extern void __pthread_exit (void *value) __attribute__ ((__noreturn__));
extern int __pthread_setcanceltype (int type, int *oldtype);
extern int __pthread_enable_asynccancel (void) attribute_hidden;
extern void __pthread_disable_asynccancel (int oldtype)
diff --git a/libc/nptl/semaphore.h b/libc/nptl/semaphore.h
index 11caf664a..864bac380 100644
--- a/libc/nptl/semaphore.h
+++ b/libc/nptl/semaphore.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2011 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2011, 2012 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
@@ -40,13 +40,13 @@ extern int sem_init (sem_t *__sem, int __pshared, unsigned int __value)
extern int sem_destroy (sem_t *__sem) __THROW;
/* Open a named semaphore NAME with open flags OFLAG. */
-extern sem_t *sem_open (__const char *__name, int __oflag, ...) __THROW;
+extern sem_t *sem_open (const char *__name, int __oflag, ...) __THROW;
/* Close descriptor for named semaphore SEM. */
extern int sem_close (sem_t *__sem) __THROW;
/* Remove named semaphore NAME. */
-extern int sem_unlink (__const char *__name) __THROW;
+extern int sem_unlink (const char *__name) __THROW;
/* Wait for SEM being posted.
@@ -60,7 +60,7 @@ extern int sem_wait (sem_t *__sem);
This function is a cancellation point and therefore not marked with
__THROW. */
extern int sem_timedwait (sem_t *__restrict __sem,
- __const struct timespec *__restrict __abstime);
+ const struct timespec *__restrict __abstime);
#endif
/* Test whether SEM is posted. */
diff --git a/libc/nptl/shlib-versions b/libc/nptl/shlib-versions
index 06ac620f0..ee86161fd 100644
--- a/libc/nptl/shlib-versions
+++ b/libc/nptl/shlib-versions
@@ -1,10 +1,6 @@
-mips.*-.*-linux.* libpthread=0 GLIBC_2.0 GLIBC_2.2
sparc64.*-.*-linux.* libpthread=0 GLIBC_2.2
sh.*-.*-linux.* libpthread=0 GLIBC_2.2
-ia64.*-.*-linux.* libpthread=0 GLIBC_2.2
-hppa.*-.*-linux.* libpthread=0 GLIBC_2.2
s390x-.*-linux.* libpthread=0 GLIBC_2.2
-cris-.*-linux.* libpthread=0 GLIBC_2.2
x86_64-.*-linux.* libpthread=0 GLIBC_2.2.5
powerpc64-.*-linux.* libpthread=0 GLIBC_2.3
.*-.*-linux.* libpthread=0
diff --git a/libc/nptl/sysdeps/ia64/Makefile b/libc/nptl/sysdeps/ia64/Makefile
deleted file mode 100644
index 3229d3f16..000000000
--- a/libc/nptl/sysdeps/ia64/Makefile
+++ /dev/null
@@ -1,25 +0,0 @@
-# Copyright (C) 2003 Free Software Foundation, Inc.
-# This file is part of the GNU C Library.
-
-# The GNU C Library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-
-# The GNU C Library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-
-# You should have received a copy of the GNU Lesser General Public
-# License along with the GNU C Library; if not, write to the Free
-# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-# 02111-1307 USA.
-
-ifeq ($(subdir),csu)
-gen-as-const-headers += tcb-offsets.sym
-endif
-
-ifeq ($(subdir),nptl)
-libpthread-routines += ptw-sysdep ptw-sigblock ptw-sigprocmask
-endif
diff --git a/libc/nptl/sysdeps/ia64/pthread_spin_lock.c b/libc/nptl/sysdeps/ia64/pthread_spin_lock.c
deleted file mode 100644
index 7d25af7c4..000000000
--- a/libc/nptl/sysdeps/ia64/pthread_spin_lock.c
+++ /dev/null
@@ -1,36 +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"
-
-int
-pthread_spin_lock (lock)
- pthread_spinlock_t *lock;
-{
- int *p = (int *) lock;
-
- while (__builtin_expect (__sync_val_compare_and_swap (p, 0, 1), 0))
- {
- /* Spin without using the atomic instruction. */
- do
- __asm __volatile ("hint @pause" : : : "memory");
- while (*p);
- }
- return 0;
-}
diff --git a/libc/nptl/sysdeps/ia64/pthread_spin_trylock.c b/libc/nptl/sysdeps/ia64/pthread_spin_trylock.c
deleted file mode 100644
index 0fd8b99b7..000000000
--- a/libc/nptl/sysdeps/ia64/pthread_spin_trylock.c
+++ /dev/null
@@ -1,28 +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 <errno.h>
-#include "pthreadP.h"
-
-int
-pthread_spin_trylock (lock)
- pthread_spinlock_t *lock;
-{
- return __sync_val_compare_and_swap ((int *) lock, 0, 1) == 0 ? 0 : EBUSY;
-}
diff --git a/libc/nptl/sysdeps/ia64/pthread_spin_unlock.c b/libc/nptl/sysdeps/ia64/pthread_spin_unlock.c
deleted file mode 100644
index 50d9c5f6a..000000000
--- a/libc/nptl/sysdeps/ia64/pthread_spin_unlock.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Copyright (C) 2003, 2006 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"
-
-
-int
-pthread_spin_unlock (pthread_spinlock_t *lock)
-{
- __sync_lock_release ((int *) lock);
- return 0;
-}
diff --git a/libc/nptl/sysdeps/ia64/pthreaddef.h b/libc/nptl/sysdeps/ia64/pthreaddef.h
deleted file mode 100644
index f2539e290..000000000
--- a/libc/nptl/sysdeps/ia64/pthreaddef.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* Copyright (C) 2003 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-/* Default stack size. */
-#define ARCH_STACK_DEFAULT_SIZE (32 * 1024 * 1024)
-
-/* IA-64 uses a normal stack and a register stack. */
-#define NEED_SEPARATE_REGISTER_STACK
-
-/* Required stack pointer alignment at beginning. */
-#define STACK_ALIGN 16
-
-/* Minimal stack size after allocating thread descriptor and guard size. */
-#define MINIMAL_REST_STACK 16384
-
-/* Alignment requirement for TCB. */
-#define TCB_ALIGNMENT 16
-
-
-/* Location of current stack frame. */
-#define CURRENT_STACK_FRAME __stack_pointer
-register char *__stack_pointer __asm__ ("sp");
-
-/* XXX Until we have a better place keep the definitions here. */
-
-/* While there is no such syscall. */
-#define __exit_thread_inline(val) \
- INLINE_SYSCALL (exit, 1, (val))
diff --git a/libc/nptl/sysdeps/ia64/tcb-offsets.sym b/libc/nptl/sysdeps/ia64/tcb-offsets.sym
deleted file mode 100644
index e1707ab1c..000000000
--- a/libc/nptl/sysdeps/ia64/tcb-offsets.sym
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <sysdep.h>
-#include <tls.h>
-
-PID offsetof (struct pthread, pid) - TLS_PRE_TCB_SIZE
-TID offsetof (struct pthread, tid) - TLS_PRE_TCB_SIZE
-MULTIPLE_THREADS_OFFSET offsetof (struct pthread, header.multiple_threads) - TLS_PRE_TCB_SIZE
-SYSINFO_OFFSET offsetof (tcbhead_t, __private)
diff --git a/libc/nptl/sysdeps/ia64/tls.h b/libc/nptl/sysdeps/ia64/tls.h
deleted file mode 100644
index c2a092663..000000000
--- a/libc/nptl/sysdeps/ia64/tls.h
+++ /dev/null
@@ -1,186 +0,0 @@
-/* Definition for thread-local data handling. nptl/IA-64 version.
- Copyright (C) 2003-2007, 2011 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 1
-
-#include <dl-sysdep.h>
-#ifndef __ASSEMBLER__
-# include <stdbool.h>
-# include <stddef.h>
-# include <stdint.h>
-# include <stdlib.h>
-# include <list.h>
-
-
-/* Type for the dtv. */
-typedef union dtv
-{
- size_t counter;
- struct
- {
- void *val;
- bool is_static;
- } pointer;
-} dtv_t;
-
-
-typedef struct
-{
- dtv_t *dtv;
- void *__private;
-} tcbhead_t;
-
-register struct pthread *__thread_self __asm__("r13");
-
-# define TLS_MULTIPLE_THREADS_IN_TCB 1
-
-#else /* __ASSEMBLER__ */
-# include <tcb-offsets.h>
-#endif
-
-
-/* Alignment requirement for the stack. */
-#define STACK_ALIGN 16
-
-#ifndef __ASSEMBLER__
-/* Get system call information. */
-# include <sysdep.h>
-
-/* This is the size of the initial TCB. */
-# define TLS_INIT_TCB_SIZE sizeof (tcbhead_t)
-
-/* Alignment requirements for the initial TCB. */
-# define TLS_INIT_TCB_ALIGN __alignof__ (tcbhead_t)
-
-/* This is the size of the TCB. */
-# define TLS_TCB_SIZE sizeof (tcbhead_t)
-
-/* This is the size we need before TCB.
- If there is not any room for uintptr_t stack_guard and
- uintptr_t pointer_guard in struct pthread's final padding,
- we need to put struct pthread 16 byte slower. */
-# define TLS_PRE_TCB_SIZE \
- (sizeof (struct pthread) \
- + (PTHREAD_STRUCT_END_PADDING < 2 * sizeof (uintptr_t) \
- ? ((2 * sizeof (uintptr_t) + __alignof__ (struct pthread) - 1) \
- & ~(__alignof__ (struct pthread) - 1)) \
- : 0))
-
-/* Alignment requirements for the TCB. */
-# define TLS_TCB_ALIGN __alignof__ (struct pthread)
-
-/* The DTV is allocated at the TP; the TCB is placed elsewhere. */
-# define TLS_DTV_AT_TP 1
-
-/* Get the thread descriptor definition. */
-# include <nptl/descr.h>
-
-/* Install the dtv pointer. The pointer passed is to the element with
- index -1 which contain the length. */
-# define INSTALL_DTV(descr, dtvp) \
- ((tcbhead_t *) (descr))->dtv = (dtvp) + 1
-
-/* Install new dtv for current thread. */
-# define INSTALL_NEW_DTV(DTV) \
- (((tcbhead_t *)__thread_self)->dtv = (DTV))
-
-/* Return dtv of given thread descriptor. */
-# define GET_DTV(descr) \
- (((tcbhead_t *) (descr))->dtv)
-
-#define THREAD_SELF_SYSINFO (((tcbhead_t *) __thread_self)->__private)
-#define THREAD_SYSINFO(pd) \
- (((tcbhead_t *) ((char *) (pd) + TLS_PRE_TCB_SIZE))->__private)
-
-#if defined NEED_DL_SYSINFO
-# define INIT_SYSINFO THREAD_SELF_SYSINFO = (void *) GLRO(dl_sysinfo)
-#else
-# define INIT_SYSINFO NULL
-#endif
-
-/* Code to initially initialize the thread pointer. This might need
- special attention since 'errno' is not yet available and if the
- operation can cause a failure 'errno' must not be touched. */
-# define TLS_INIT_TP(thrdescr, secondcall) \
- (__thread_self = (thrdescr), INIT_SYSINFO, NULL)
-
-/* Return the address of the dtv for the current thread. */
-# define THREAD_DTV() \
- (((tcbhead_t *)__thread_self)->dtv)
-
-/* Return the thread descriptor for the current thread. */
-# define THREAD_SELF \
- ((struct pthread *) ((char *) __thread_self - TLS_PRE_TCB_SIZE))
-
-/* Magic for libthread_db to know how to do THREAD_SELF. */
-# define DB_THREAD_SELF REGISTER (64, 64, 13 * 8, -TLS_PRE_TCB_SIZE)
-
-/* Access to data in the thread descriptor is easy. */
-#define THREAD_GETMEM(descr, member) \
- descr->member
-#define THREAD_GETMEM_NC(descr, member, idx) \
- descr->member[idx]
-#define THREAD_SETMEM(descr, member, value) \
- descr->member = (value)
-#define THREAD_SETMEM_NC(descr, member, idx, value) \
- descr->member[idx] = (value)
-
-/* Set the stack guard field in TCB head. */
-#define THREAD_SET_STACK_GUARD(value) \
- (((uintptr_t *) __thread_self)[-1] = (value))
-#define THREAD_COPY_STACK_GUARD(descr) \
- (((uintptr_t *) ((char *) (descr) + TLS_PRE_TCB_SIZE))[-1] \
- = ((uintptr_t *) __thread_self)[-1])
-
-/* Set the pointer guard field in TCB head. */
-#define THREAD_GET_POINTER_GUARD() \
- (((uintptr_t *) __thread_self)[-2])
-#define THREAD_SET_POINTER_GUARD(value) \
- (((uintptr_t *) __thread_self)[-2] = (value))
-#define THREAD_COPY_POINTER_GUARD(descr) \
- (((uintptr_t *) ((char *) (descr) + TLS_PRE_TCB_SIZE))[-2] \
- = THREAD_GET_POINTER_GUARD ())
-
-/* Get and set the global scope generation counter in struct pthread. */
-#define THREAD_GSCOPE_FLAG_UNUSED 0
-#define THREAD_GSCOPE_FLAG_USED 1
-#define THREAD_GSCOPE_FLAG_WAIT 2
-#define THREAD_GSCOPE_RESET_FLAG() \
- do \
- { int __res \
- = atomic_exchange_rel (&THREAD_SELF->header.gscope_flag, \
- THREAD_GSCOPE_FLAG_UNUSED); \
- if (__res == THREAD_GSCOPE_FLAG_WAIT) \
- lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1, LLL_PRIVATE); \
- } \
- while (0)
-#define THREAD_GSCOPE_SET_FLAG() \
- do \
- { \
- THREAD_SELF->header.gscope_flag = THREAD_GSCOPE_FLAG_USED; \
- atomic_write_barrier (); \
- } \
- while (0)
-#define THREAD_GSCOPE_WAIT() \
- GL(dl_wait_lookup_done) ()
-
-#endif /* __ASSEMBLER__ */
-
-#endif /* tls.h */
diff --git a/libc/nptl/sysdeps/pthread/bits/libc-lock.h b/libc/nptl/sysdeps/pthread/bits/libc-lock.h
index b38f958e2..a41b71632 100644
--- a/libc/nptl/sysdeps/pthread/bits/libc-lock.h
+++ b/libc/nptl/sysdeps/pthread/bits/libc-lock.h
@@ -1,5 +1,5 @@
/* libc-internal interface for mutex locks. NPTL version.
- Copyright (C) 1996-2003, 2005, 2007 Free Software Foundation, Inc.
+ Copyright (C) 1996-2003, 2005, 2007, 2012 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
@@ -144,7 +144,7 @@ typedef pthread_key_t __libc_key_t;
#ifdef __PIC__
# define __libc_maybe_call(FUNC, ARGS, ELSE) \
(__extension__ ({ __typeof (FUNC) *_fn = (FUNC); \
- _fn != NULL ? (*_fn) ARGS : ELSE; }))
+ _fn != NULL ? (*_fn) ARGS : ELSE; }))
#else
# define __libc_maybe_call(FUNC, ARGS, ELSE) \
(FUNC != NULL ? FUNC ARGS : ELSE)
@@ -457,13 +457,13 @@ libc_hidden_proto (__libc_lock_unlock_recursive_fn);
no C++ code is called in the middle. The old-style handling is
faster and the support is not going away. */
extern void _pthread_cleanup_push (struct _pthread_cleanup_buffer *buffer,
- void (*routine) (void *), void *arg);
+ void (*routine) (void *), void *arg);
extern void _pthread_cleanup_pop (struct _pthread_cleanup_buffer *buffer,
- int execute);
+ int execute);
extern void _pthread_cleanup_push_defer (struct _pthread_cleanup_buffer *buffer,
- void (*routine) (void *), void *arg);
+ void (*routine) (void *), void *arg);
extern void _pthread_cleanup_pop_restore (struct _pthread_cleanup_buffer *buffer,
- int execute);
+ int execute);
/* Start critical region with cleanup. */
#define __libc_cleanup_region_start(DOIT, FCT, ARG) \
@@ -511,7 +511,7 @@ __libc_cleanup_routine (struct __pthread_cleanup_frame *f)
struct __pthread_cleanup_frame __clframe \
__attribute__ ((__cleanup__ (__libc_cleanup_routine))) \
= { .__cancel_routine = (fct), .__cancel_arg = (arg), \
- .__do_it = 1 };
+ .__do_it = 1 };
#define __libc_cleanup_pop(execute) \
__clframe.__do_it = (execute); \
@@ -545,7 +545,7 @@ extern int __register_atfork (void (*__prepare) (void),
library. */
extern int __pthread_mutex_init (pthread_mutex_t *__mutex,
- __const pthread_mutexattr_t *__mutex_attr);
+ const pthread_mutexattr_t *__mutex_attr);
extern int __pthread_mutex_destroy (pthread_mutex_t *__mutex);
@@ -564,7 +564,7 @@ extern int __pthread_mutexattr_settype (pthread_mutexattr_t *__attr,
#ifdef __USE_UNIX98
extern int __pthread_rwlock_init (pthread_rwlock_t *__rwlock,
- __const pthread_rwlockattr_t *__attr);
+ const pthread_rwlockattr_t *__attr);
extern int __pthread_rwlock_destroy (pthread_rwlock_t *__rwlock);
@@ -583,7 +583,7 @@ extern int __pthread_key_create (pthread_key_t *__key,
void (*__destr_function) (void *));
extern int __pthread_setspecific (pthread_key_t __key,
- __const void *__pointer);
+ const void *__pointer);
extern void *__pthread_getspecific (pthread_key_t __key);
diff --git a/libc/nptl/sysdeps/pthread/bits/sigthread.h b/libc/nptl/sysdeps/pthread/bits/sigthread.h
index 9a524e57d..672e7afcc 100644
--- a/libc/nptl/sysdeps/pthread/bits/sigthread.h
+++ b/libc/nptl/sysdeps/pthread/bits/sigthread.h
@@ -1,5 +1,5 @@
/* Signal handling function for threaded programs.
- Copyright (C) 1998, 1999, 2000, 2002, 2009 Free Software Foundation, Inc.
+ Copyright (C) 1998-2000, 2002, 2009, 2012 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
@@ -29,7 +29,7 @@
/* Modify the signal mask for the calling thread. The arguments have
the same meaning as for sigprocmask(2). */
extern int pthread_sigmask (int __how,
- __const __sigset_t *__restrict __newmask,
+ const __sigset_t *__restrict __newmask,
__sigset_t *__restrict __oldmask)__THROW;
/* Send signal SIGNO to the given thread. */
diff --git a/libc/nptl/sysdeps/pthread/pthread-functions.h b/libc/nptl/sysdeps/pthread/pthread-functions.h
index 15a4dff14..5d77cb71d 100644
--- a/libc/nptl/sysdeps/pthread/pthread-functions.h
+++ b/libc/nptl/sysdeps/pthread/pthread-functions.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004, 2005, 2006, 2007, 2011 Free Software Foundation, Inc.
+/* Copyright (C) 2003-2007, 2011, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
@@ -66,7 +66,7 @@ struct pthread_functions
pthread_mutex_t *,
const struct timespec *);
int (*ptr_pthread_equal) (pthread_t, pthread_t);
- void (*ptr___pthread_exit) (void *);
+ void (*ptr___pthread_exit) (void *) __attribute__ ((__noreturn__));
int (*ptr_pthread_getschedparam) (pthread_t, int *, struct sched_param *);
int (*ptr_pthread_setschedparam) (pthread_t, int,
const struct sched_param *);
diff --git a/libc/nptl/sysdeps/pthread/pthread.h b/libc/nptl/sysdeps/pthread/pthread.h
index a92428162..ce38cf9d6 100644
--- a/libc/nptl/sysdeps/pthread/pthread.h
+++ b/libc/nptl/sysdeps/pthread/pthread.h
@@ -1,5 +1,4 @@
-/* Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
- Free Software Foundation, Inc.
+/* Copyright (C) 2002-2011, 2012 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
@@ -223,7 +222,7 @@ __BEGIN_DECLS
getting passed ARG. Creation attributed come from ATTR. The new
handle is stored in *NEWTHREAD. */
extern int pthread_create (pthread_t *__restrict __newthread,
- __const pthread_attr_t *__restrict __attr,
+ const pthread_attr_t *__restrict __attr,
void *(*__start_routine) (void *),
void *__restrict __arg) __THROWNL __nonnull ((1, 3));
@@ -253,7 +252,7 @@ extern int pthread_tryjoin_np (pthread_t __th, void **__thread_return) __THROW;
This function is a cancellation point and therefore not marked with
__THROW. */
extern int pthread_timedjoin_np (pthread_t __th, void **__thread_return,
- __const struct timespec *__abstime);
+ const struct timespec *__abstime);
#endif
/* Indicate that the thread TH is never to be joined with PTHREAD_JOIN.
@@ -267,7 +266,8 @@ extern int pthread_detach (pthread_t __th) __THROW;
extern pthread_t pthread_self (void) __THROW __attribute__ ((__const__));
/* Compare two thread identifiers. */
-extern int pthread_equal (pthread_t __thread1, pthread_t __thread2) __THROW;
+extern int pthread_equal (pthread_t __thread1, pthread_t __thread2)
+ __THROW __attribute__ ((__const__));
/* Thread attribute handling. */
@@ -282,7 +282,7 @@ extern int pthread_attr_destroy (pthread_attr_t *__attr)
__THROW __nonnull ((1));
/* Get detach state attribute. */
-extern int pthread_attr_getdetachstate (__const pthread_attr_t *__attr,
+extern int pthread_attr_getdetachstate (const pthread_attr_t *__attr,
int *__detachstate)
__THROW __nonnull ((1, 2));
@@ -293,7 +293,7 @@ extern int pthread_attr_setdetachstate (pthread_attr_t *__attr,
/* Get the size of the guard area created for stack overflow protection. */
-extern int pthread_attr_getguardsize (__const pthread_attr_t *__attr,
+extern int pthread_attr_getguardsize (const pthread_attr_t *__attr,
size_t *__guardsize)
__THROW __nonnull ((1, 2));
@@ -304,18 +304,17 @@ extern int pthread_attr_setguardsize (pthread_attr_t *__attr,
/* Return in *PARAM the scheduling parameters of *ATTR. */
-extern int pthread_attr_getschedparam (__const pthread_attr_t *__restrict
- __attr,
+extern int pthread_attr_getschedparam (const pthread_attr_t *__restrict __attr,
struct sched_param *__restrict __param)
__THROW __nonnull ((1, 2));
/* Set scheduling parameters (priority, etc) in *ATTR according to PARAM. */
extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr,
- __const struct sched_param *__restrict
+ const struct sched_param *__restrict
__param) __THROW __nonnull ((1, 2));
/* Return in *POLICY the scheduling policy of *ATTR. */
-extern int pthread_attr_getschedpolicy (__const pthread_attr_t *__restrict
+extern int pthread_attr_getschedpolicy (const pthread_attr_t *__restrict
__attr, int *__restrict __policy)
__THROW __nonnull ((1, 2));
@@ -324,7 +323,7 @@ extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy)
__THROW __nonnull ((1));
/* Return in *INHERIT the scheduling inheritance mode of *ATTR. */
-extern int pthread_attr_getinheritsched (__const pthread_attr_t *__restrict
+extern int pthread_attr_getinheritsched (const pthread_attr_t *__restrict
__attr, int *__restrict __inherit)
__THROW __nonnull ((1, 2));
@@ -335,7 +334,7 @@ extern int pthread_attr_setinheritsched (pthread_attr_t *__attr,
/* Return in *SCOPE the scheduling contention scope of *ATTR. */
-extern int pthread_attr_getscope (__const pthread_attr_t *__restrict __attr,
+extern int pthread_attr_getscope (const pthread_attr_t *__restrict __attr,
int *__restrict __scope)
__THROW __nonnull ((1, 2));
@@ -344,7 +343,7 @@ extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope)
__THROW __nonnull ((1));
/* Return the previously set address for the stack. */
-extern int pthread_attr_getstackaddr (__const pthread_attr_t *__restrict
+extern int pthread_attr_getstackaddr (const pthread_attr_t *__restrict
__attr, void **__restrict __stackaddr)
__THROW __nonnull ((1, 2)) __attribute_deprecated__;
@@ -357,7 +356,7 @@ extern int pthread_attr_setstackaddr (pthread_attr_t *__attr,
__THROW __nonnull ((1)) __attribute_deprecated__;
/* Return the currently used minimal stack size. */
-extern int pthread_attr_getstacksize (__const pthread_attr_t *__restrict
+extern int pthread_attr_getstacksize (const pthread_attr_t *__restrict
__attr, size_t *__restrict __stacksize)
__THROW __nonnull ((1, 2));
@@ -370,7 +369,7 @@ extern int pthread_attr_setstacksize (pthread_attr_t *__attr,
#ifdef __USE_XOPEN2K
/* Return the previously set address for the stack. */
-extern int pthread_attr_getstack (__const pthread_attr_t *__restrict __attr,
+extern int pthread_attr_getstack (const pthread_attr_t *__restrict __attr,
void **__restrict __stackaddr,
size_t *__restrict __stacksize)
__THROW __nonnull ((1, 2, 3));
@@ -387,12 +386,12 @@ extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr,
the processors represented in CPUSET. */
extern int pthread_attr_setaffinity_np (pthread_attr_t *__attr,
size_t __cpusetsize,
- __const cpu_set_t *__cpuset)
+ const cpu_set_t *__cpuset)
__THROW __nonnull ((1, 3));
/* Get bit set in CPUSET representing the processors threads created with
ATTR can run on. */
-extern int pthread_attr_getaffinity_np (__const pthread_attr_t *__attr,
+extern int pthread_attr_getaffinity_np (const pthread_attr_t *__attr,
size_t __cpusetsize,
cpu_set_t *__cpuset)
__THROW __nonnull ((1, 3));
@@ -411,7 +410,7 @@ extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr)
/* Set the scheduling parameters for TARGET_THREAD according to POLICY
and *PARAM. */
extern int pthread_setschedparam (pthread_t __target_thread, int __policy,
- __const struct sched_param *__param)
+ const struct sched_param *__param)
__THROW __nonnull ((3));
/* Return in *POLICY and *PARAM the scheduling parameters for TARGET_THREAD. */
@@ -432,7 +431,7 @@ extern int pthread_getname_np (pthread_t __target_thread, char *__buf,
__THROW __nonnull ((2));
/* Set thread name visible in the kernel and its interfaces. */
-extern int pthread_setname_np (pthread_t __target_thread, __const char *__name)
+extern int pthread_setname_np (pthread_t __target_thread, const char *__name)
__THROW __nonnull ((2));
#endif
@@ -456,7 +455,7 @@ extern int pthread_yield (void) __THROW;
/* Limit specified thread TH to run only on the processors represented
in CPUSET. */
extern int pthread_setaffinity_np (pthread_t __th, size_t __cpusetsize,
- __const cpu_set_t *__cpuset)
+ const cpu_set_t *__cpuset)
__THROW __nonnull ((3));
/* Get bit set in CPUSET representing the processors TH can run on. */
@@ -731,7 +730,7 @@ extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) __THROW;
/* Initialize a mutex. */
extern int pthread_mutex_init (pthread_mutex_t *__mutex,
- __const pthread_mutexattr_t *__mutexattr)
+ const pthread_mutexattr_t *__mutexattr)
__THROW __nonnull ((1));
/* Destroy a mutex. */
@@ -749,7 +748,7 @@ extern int pthread_mutex_lock (pthread_mutex_t *__mutex)
#ifdef __USE_XOPEN2K
/* Wait until lock becomes available, or specified time passes. */
extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex,
- __const struct timespec *__restrict
+ const struct timespec *__restrict
__abstime) __THROWNL __nonnull ((1, 2));
#endif
@@ -759,7 +758,7 @@ extern int pthread_mutex_unlock (pthread_mutex_t *__mutex)
/* Get the priority ceiling of MUTEX. */
-extern int pthread_mutex_getprioceiling (__const pthread_mutex_t *
+extern int pthread_mutex_getprioceiling (const pthread_mutex_t *
__restrict __mutex,
int *__restrict __prioceiling)
__THROW __nonnull ((1, 2));
@@ -795,7 +794,7 @@ extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr)
__THROW __nonnull ((1));
/* Get the process-shared flag of the mutex attribute ATTR. */
-extern int pthread_mutexattr_getpshared (__const pthread_mutexattr_t *
+extern int pthread_mutexattr_getpshared (const pthread_mutexattr_t *
__restrict __attr,
int *__restrict __pshared)
__THROW __nonnull ((1, 2));
@@ -807,7 +806,7 @@ extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr,
#if defined __USE_UNIX98 || defined __USE_XOPEN2K8
/* Return in *KIND the mutex kind attribute in *ATTR. */
-extern int pthread_mutexattr_gettype (__const pthread_mutexattr_t *__restrict
+extern int pthread_mutexattr_gettype (const pthread_mutexattr_t *__restrict
__attr, int *__restrict __kind)
__THROW __nonnull ((1, 2));
@@ -819,7 +818,7 @@ extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind)
#endif
/* Return in *PROTOCOL the mutex protocol attribute in *ATTR. */
-extern int pthread_mutexattr_getprotocol (__const pthread_mutexattr_t *
+extern int pthread_mutexattr_getprotocol (const pthread_mutexattr_t *
__restrict __attr,
int *__restrict __protocol)
__THROW __nonnull ((1, 2));
@@ -831,7 +830,7 @@ extern int pthread_mutexattr_setprotocol (pthread_mutexattr_t *__attr,
__THROW __nonnull ((1));
/* Return in *PRIOCEILING the mutex prioceiling attribute in *ATTR. */
-extern int pthread_mutexattr_getprioceiling (__const pthread_mutexattr_t *
+extern int pthread_mutexattr_getprioceiling (const pthread_mutexattr_t *
__restrict __attr,
int *__restrict __prioceiling)
__THROW __nonnull ((1, 2));
@@ -843,11 +842,11 @@ extern int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *__attr,
#ifdef __USE_XOPEN2K
/* Get the robustness flag of the mutex attribute ATTR. */
-extern int pthread_mutexattr_getrobust (__const pthread_mutexattr_t *__attr,
+extern int pthread_mutexattr_getrobust (const pthread_mutexattr_t *__attr,
int *__robustness)
__THROW __nonnull ((1, 2));
# ifdef __USE_GNU
-extern int pthread_mutexattr_getrobust_np (__const pthread_mutexattr_t *__attr,
+extern int pthread_mutexattr_getrobust_np (const pthread_mutexattr_t *__attr,
int *__robustness)
__THROW __nonnull ((1, 2));
# endif
@@ -870,7 +869,7 @@ extern int pthread_mutexattr_setrobust_np (pthread_mutexattr_t *__attr,
/* Initialize read-write lock RWLOCK using attributes ATTR, or use
the default values if later is NULL. */
extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock,
- __const pthread_rwlockattr_t *__restrict
+ const pthread_rwlockattr_t *__restrict
__attr) __THROW __nonnull ((1));
/* Destroy read-write lock RWLOCK. */
@@ -888,7 +887,7 @@ extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock)
# ifdef __USE_XOPEN2K
/* Try to acquire read lock for RWLOCK or return after specfied time. */
extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock,
- __const struct timespec *__restrict
+ const struct timespec *__restrict
__abstime) __THROWNL __nonnull ((1, 2));
# endif
@@ -903,7 +902,7 @@ extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock)
# ifdef __USE_XOPEN2K
/* Try to acquire write lock for RWLOCK or return after specfied time. */
extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock,
- __const struct timespec *__restrict
+ const struct timespec *__restrict
__abstime) __THROWNL __nonnull ((1, 2));
# endif
@@ -923,7 +922,7 @@ extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr)
__THROW __nonnull ((1));
/* Return current setting of process-shared attribute of ATTR in PSHARED. */
-extern int pthread_rwlockattr_getpshared (__const pthread_rwlockattr_t *
+extern int pthread_rwlockattr_getpshared (const pthread_rwlockattr_t *
__restrict __attr,
int *__restrict __pshared)
__THROW __nonnull ((1, 2));
@@ -934,7 +933,7 @@ extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr,
__THROW __nonnull ((1));
/* Return current setting of reader/writer preference. */
-extern int pthread_rwlockattr_getkind_np (__const pthread_rwlockattr_t *
+extern int pthread_rwlockattr_getkind_np (const pthread_rwlockattr_t *
__restrict __attr,
int *__restrict __pref)
__THROW __nonnull ((1, 2));
@@ -950,8 +949,8 @@ extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr,
/* Initialize condition variable COND using attributes ATTR, or use
the default values if later is NULL. */
extern int pthread_cond_init (pthread_cond_t *__restrict __cond,
- __const pthread_condattr_t *__restrict
- __cond_attr) __THROW __nonnull ((1));
+ const pthread_condattr_t *__restrict __cond_attr)
+ __THROW __nonnull ((1));
/* Destroy condition variable COND. */
extern int pthread_cond_destroy (pthread_cond_t *__cond)
@@ -983,8 +982,8 @@ extern int pthread_cond_wait (pthread_cond_t *__restrict __cond,
__THROW. */
extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond,
pthread_mutex_t *__restrict __mutex,
- __const struct timespec *__restrict
- __abstime) __nonnull ((1, 2, 3));
+ const struct timespec *__restrict __abstime)
+ __nonnull ((1, 2, 3));
/* Functions for handling condition variable attributes. */
@@ -997,7 +996,7 @@ extern int pthread_condattr_destroy (pthread_condattr_t *__attr)
__THROW __nonnull ((1));
/* Get the process-shared flag of the condition variable attribute ATTR. */
-extern int pthread_condattr_getpshared (__const pthread_condattr_t *
+extern int pthread_condattr_getpshared (const pthread_condattr_t *
__restrict __attr,
int *__restrict __pshared)
__THROW __nonnull ((1, 2));
@@ -1008,7 +1007,7 @@ extern int pthread_condattr_setpshared (pthread_condattr_t *__attr,
#ifdef __USE_XOPEN2K
/* Get the clock selected for the conditon variable attribute ATTR. */
-extern int pthread_condattr_getclock (__const pthread_condattr_t *
+extern int pthread_condattr_getclock (const pthread_condattr_t *
__restrict __attr,
__clockid_t *__restrict __clock_id)
__THROW __nonnull ((1, 2));
@@ -1050,7 +1049,7 @@ extern int pthread_spin_unlock (pthread_spinlock_t *__lock)
/* Initialize BARRIER with the attributes in ATTR. The barrier is
opened when COUNT waiters arrived. */
extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier,
- __const pthread_barrierattr_t *__restrict
+ const pthread_barrierattr_t *__restrict
__attr, unsigned int __count)
__THROW __nonnull ((1));
@@ -1072,7 +1071,7 @@ extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr)
__THROW __nonnull ((1));
/* Get the process-shared flag of the barrier attribute ATTR. */
-extern int pthread_barrierattr_getpshared (__const pthread_barrierattr_t *
+extern int pthread_barrierattr_getpshared (const pthread_barrierattr_t *
__restrict __attr,
int *__restrict __pshared)
__THROW __nonnull ((1, 2));
@@ -1104,7 +1103,7 @@ extern void *pthread_getspecific (pthread_key_t __key) __THROW;
/* Store POINTER in the thread-specific data slot identified by KEY. */
extern int pthread_setspecific (pthread_key_t __key,
- __const void *__pointer) __THROW ;
+ const void *__pointer) __THROW ;
#ifdef __USE_XOPEN2K
diff --git a/libc/nptl/sysdeps/unix/sysv/linux/aio_misc.h b/libc/nptl/sysdeps/unix/sysv/linux/aio_misc.h
index 406d96e86..8011c3e33 100644
--- a/libc/nptl/sysdeps/unix/sysv/linux/aio_misc.h
+++ b/libc/nptl/sysdeps/unix/sysv/linux/aio_misc.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2004, 2006, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2004.
@@ -47,7 +47,7 @@ __aio_create_helper_thread (pthread_t *threadp, void *(*tf) (void *),
pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED);
/* The helper thread needs only very little resources. */
- (void) pthread_attr_setstacksize (&attr, PTHREAD_STACK_MIN);
+ (void) pthread_attr_setstacksize (&attr, __pthread_get_minstack (&attr));
/* Block all signals in the helper thread. To do this thoroughly we
temporarily have to block all signals here. */
diff --git a/libc/nptl/sysdeps/unix/sysv/linux/i386/Makefile b/libc/nptl/sysdeps/unix/sysv/linux/i386/Makefile
deleted file mode 100644
index 48eef38a2..000000000
--- a/libc/nptl/sysdeps/unix/sysv/linux/i386/Makefile
+++ /dev/null
@@ -1,3 +0,0 @@
-ifeq ($(subdir),nptl)
-CFLAGS-pt-initfini.s += -fno-asynchronous-unwind-tables
-endif
diff --git a/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S b/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
index 54590b7b8..8a84759dc 100644
--- a/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
+++ b/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
@@ -1,4 +1,5 @@
-/* Copyright (C) 2002-2004,2006-2007,2009,2010 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2004,2006-2007,2009,2010,2012
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
@@ -649,17 +650,6 @@ __condvar_w_cleanup:
.uleb128 0
.Lcstend:
-#ifdef PIC
- .section .gnu.linkonce.t.__i686.get_pc_thunk.cx,"ax",@progbits
- .globl __i686.get_pc_thunk.cx
- .hidden __i686.get_pc_thunk.cx
- .type __i686.get_pc_thunk.cx,@function
-__i686.get_pc_thunk.cx:
- movl (%esp), %ecx;
- ret
- .size __i686.get_pc_thunk.cx,.-__i686.get_pc_thunk.cx
-#endif
-
#ifdef SHARED
.hidden DW.ref.__gcc_personality_v0
.weak DW.ref.__gcc_personality_v0
diff --git a/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_post.S b/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_post.S
index 9f3e63520..624a474a4 100644
--- a/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_post.S
+++ b/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_post.S
@@ -1,4 +1,5 @@
-/* Copyright (C) 2002,2003,2005,2007,2008,2011 Free Software Foundation, Inc.
+/* Copyright (C) 2002,2003,2005,2007,2008,2011-2012
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
@@ -75,7 +76,7 @@ __new_sem_post:
cfi_offset(%ebx, -8)
1:
#ifdef PIC
- call __i686.get_pc_thunk.bx
+ SETUP_PIC_REG(bx)
#else
movl $4f, %ebx
4:
@@ -96,7 +97,7 @@ __new_sem_post:
3:
#ifdef PIC
- call __i686.get_pc_thunk.bx
+ SETUP_PIC_REG(bx)
#else
movl $5f, %ebx
5:
@@ -149,15 +150,3 @@ __old_sem_post:
.size __old_sem_post,.-__old_sem_post
compat_symbol(libpthread, __old_sem_post, sem_post, GLIBC_2_0)
#endif
-
-
-#ifdef PIC
- .section .gnu.linkonce.t.__i686.get_pc_thunk.bx,"ax",@progbits
- .globl __i686.get_pc_thunk.bx
- .hidden __i686.get_pc_thunk.bx
- .type __i686.get_pc_thunk.bx,@function
-__i686.get_pc_thunk.bx:
- movl (%esp), %ebx;
- ret
- .size __i686.get_pc_thunk.bx,.-__i686.get_pc_thunk.bx
-#endif
diff --git a/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S b/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S
index ee46ab936..1192fd74d 100644
--- a/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S
+++ b/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2005, 2007, 2009, 2011 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2005, 2007, 2009, 2011-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
@@ -148,7 +148,7 @@ sem_timedwait:
3: negl %esi
6:
#ifdef PIC
- call __i686.get_pc_thunk.bx
+ SETUP_PIC_REG(bx)
#else
movl $4f, %ebx
4:
diff --git a/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S b/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S
index 18adb9a09..a9d19ebbd 100644
--- a/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S
+++ b/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2005, 2007, 2011 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2003, 2005, 2007, 2011-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
@@ -43,7 +43,7 @@ __new_sem_trywait:
1:
#ifdef PIC
- call __i686.get_pc_thunk.cx
+ SETUP_PIC_REG(cx)
#else
movl $3f, %ecx
3:
@@ -66,15 +66,3 @@ __new_sem_trywait:
__old_sem_trywait = __new_sem_trywait
compat_symbol(libpthread, __old_sem_trywait, sem_trywait, GLIBC_2_0)
#endif
-
-
-#ifdef PIC
- .section .gnu.linkonce.t.__i686.get_pc_thunk.cx,"ax",@progbits
- .globl __i686.get_pc_thunk.cx
- .hidden __i686.get_pc_thunk.cx
- .type __i686.get_pc_thunk.cx,@function
-__i686.get_pc_thunk.cx:
- movl (%esp), %ecx;
- ret
- .size __i686.get_pc_thunk.cx,.-__i686.get_pc_thunk.cx
-#endif
diff --git a/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_wait.S b/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_wait.S
index fb8a39843..3d9ee743f 100644
--- a/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_wait.S
+++ b/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_wait.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2005, 2007, 2011 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2003, 2005, 2007, 2011-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
@@ -108,7 +108,7 @@ __new_sem_wait:
negl %esi
#ifdef PIC
- call __i686.get_pc_thunk.bx
+ SETUP_PIC_REG(bx)
#else
movl $8f, %ebx
8:
@@ -322,7 +322,7 @@ __old_sem_wait:
je 3b
negl %esi
#ifdef PIC
- call __i686.get_pc_thunk.bx
+ SETUP_PIC_REG(bx)
#else
movl $4f, %ebx
4:
diff --git a/libc/nptl/sysdeps/unix/sysv/linux/i386/pthread_once.S b/libc/nptl/sysdeps/unix/sysv/linux/i386/pthread_once.S
index f31d968bc..158633d4b 100644
--- a/libc/nptl/sysdeps/unix/sysv/linux/i386/pthread_once.S
+++ b/libc/nptl/sysdeps/unix/sysv/linux/i386/pthread_once.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2007, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
@@ -52,8 +52,7 @@ __pthread_once:
Get the fork generation counter now. */
6: movl (%ebx), %eax
#ifdef PIC
- call __i686.get_pc_thunk.cx
- addl $_GLOBAL_OFFSET_TABLE_, %ecx
+ LOAD_PIC_REG(cx)
#endif
5: movl %eax, %edx
@@ -181,15 +180,3 @@ __pthread_once_internal = __pthread_once
.globl pthread_once
pthread_once = __pthread_once
-
-
-#ifdef PIC
- .section .gnu.linkonce.t.__i686.get_pc_thunk.cx,"ax",@progbits
- .globl __i686.get_pc_thunk.cx
- .hidden __i686.get_pc_thunk.cx
- .type __i686.get_pc_thunk.cx,@function
-__i686.get_pc_thunk.cx:
- movl (%esp), %ecx;
- ret
- .size __i686.get_pc_thunk.cx,.-__i686.get_pc_thunk.cx
-#endif
diff --git a/libc/nptl/sysdeps/unix/sysv/linux/ia64/Makefile b/libc/nptl/sysdeps/unix/sysv/linux/ia64/Makefile
deleted file mode 100644
index ff98f1a49..000000000
--- a/libc/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/libc/nptl/sysdeps/unix/sysv/linux/ia64/Versions b/libc/nptl/sysdeps/unix/sysv/linux/ia64/Versions
deleted file mode 100644
index 437c4da28..000000000
--- a/libc/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/libc/nptl/sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S b/libc/nptl/sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S
deleted file mode 100644
index a1120d4d7..000000000
--- a/libc/nptl/sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S
+++ /dev/null
@@ -1,159 +0,0 @@
-/* Copyright (C) 1999, 2000, 2001, 2004, 2005 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
-#ifdef PTR_DEMANGLE
- PTR_DEMANGLE (r16, r24)
-#endif
- ;;
- 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/libc/nptl/sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c b/libc/nptl/sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c
deleted file mode 100644
index 8f552eaad..000000000
--- a/libc/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/libc/nptl/sysdeps/unix/sysv/linux/ia64/bits/local_lim.h b/libc/nptl/sysdeps/unix/sysv/linux/ia64/bits/local_lim.h
deleted file mode 100644
index 4b8a03504..000000000
--- a/libc/nptl/sysdeps/unix/sysv/linux/ia64/bits/local_lim.h
+++ /dev/null
@@ -1,100 +0,0 @@
-/* Minimum guaranteed maximum values for system limits. Linux/IA-64 version.
- Copyright (C) 1993-1998,2000,2002-2004,2008 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
-#ifndef ARG_MAX
-# define __undef_ARG_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
-/* Have to remove ARG_MAX? */
-#ifdef __undef_ARG_MAX
-# undef ARG_MAX
-# undef __undef_ARG_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
-
-/* Maximum value the semaphore can have. */
-#define SEM_VALUE_MAX (2147483647)
diff --git a/libc/nptl/sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h b/libc/nptl/sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
deleted file mode 100644
index 330717f07..000000000
--- a/libc/nptl/sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
+++ /dev/null
@@ -1,169 +0,0 @@
-/* Copyright (C) 2003, 2004, 2005, 2006, 2007 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;
-
-
-typedef struct __pthread_internal_list
-{
- struct __pthread_internal_list *__prev;
- struct __pthread_internal_list *__next;
-} __pthread_list_t;
-
-
-/* Data structures for mutex handling. The structure of the attribute
- type is not exposed on purpose. */
-typedef union
-{
- struct __pthread_mutex_s
- {
- 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;
- __pthread_list_t __list;
-#define __PTHREAD_MUTEX_HAVE_PREV 1
- } __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 __shared;
- unsigned long int __pad1;
- unsigned long int __pad2;
- /* 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/libc/nptl/sysdeps/unix/sysv/linux/ia64/bits/semaphore.h b/libc/nptl/sysdeps/unix/sysv/linux/ia64/bits/semaphore.h
deleted file mode 100644
index 0684aebe2..000000000
--- a/libc/nptl/sysdeps/unix/sysv/linux/ia64/bits/semaphore.h
+++ /dev/null
@@ -1,36 +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)
-
-
-typedef union
-{
- char __size[__SIZEOF_SEM_T];
- long int __align;
-} sem_t;
diff --git a/libc/nptl/sysdeps/unix/sysv/linux/ia64/clone2.S b/libc/nptl/sysdeps/unix/sysv/linux/ia64/clone2.S
deleted file mode 100644
index 91f28bab3..000000000
--- a/libc/nptl/sysdeps/unix/sysv/linux/ia64/clone2.S
+++ /dev/null
@@ -1,9 +0,0 @@
-/* We want an #include_next, but we are the main source file.
- So, #include ourselves and in that incarnation we can use #include_next. */
-#ifndef INCLUDED_SELF
-# define INCLUDED_SELF
-# include <clone2.S>
-#else
-# define RESET_PID
-# include_next <clone2.S>
-#endif
diff --git a/libc/nptl/sysdeps/unix/sysv/linux/ia64/createthread.c b/libc/nptl/sysdeps/unix/sysv/linux/ia64/createthread.c
deleted file mode 100644
index cd5f8137d..000000000
--- a/libc/nptl/sysdeps/unix/sysv/linux/ia64/createthread.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/* Copyright (C) 2003, 2005 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 ((char *) pd + TLS_PRE_TCB_SIZE)
-
-#define ARCH_CLONE __clone2
-
-/* Get the real implementation. */
-#include <nptl/sysdeps/pthread/createthread.c>
diff --git a/libc/nptl/sysdeps/unix/sysv/linux/ia64/dl-sysdep.h b/libc/nptl/sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
deleted file mode 100644
index 5c16bd7ae..000000000
--- a/libc/nptl/sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/* System-specific settings for dynamic linker code. IA-64 version.
- Copyright (C) 2003, 2004, 2006, 2008 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\n\t" \
- ".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
-
-
-/* The _dl_discover_osversion function is so far only needed in sysconf
- to check for kernels later than 2.6.23. */
-#if !defined __ASSEMBLER__ && __LINUX_KERNEL_VERSION < 0x020617
-/* Get version of the OS. */
-extern int _dl_discover_osversion (void) attribute_hidden;
-# define HAVE_DL_DISCOVER_OSVERSION 1
-#endif
-
-#endif /* dl-sysdep.h */
diff --git a/libc/nptl/sysdeps/unix/sysv/linux/ia64/fork.c b/libc/nptl/sysdeps/unix/sysv/linux/ia64/fork.c
deleted file mode 100644
index 1502310f1..000000000
--- a/libc/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/libc/nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h b/libc/nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h
deleted file mode 100644
index b419c9a5e..000000000
--- a/libc/nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h
+++ /dev/null
@@ -1,295 +0,0 @@
-/* Copyright (C) 2003, 2004, 2006-2008, 2009 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>
-#include <kernel-features.h>
-
-#define __NR_futex 1230
-#define FUTEX_WAIT 0
-#define FUTEX_WAKE 1
-#define FUTEX_REQUEUE 3
-#define FUTEX_CMP_REQUEUE 4
-#define FUTEX_WAKE_OP 5
-#define FUTEX_OP_CLEAR_WAKE_IF_GT_ONE ((4 << 24) | 1)
-#define FUTEX_LOCK_PI 6
-#define FUTEX_UNLOCK_PI 7
-#define FUTEX_TRYLOCK_PI 8
-#define FUTEX_WAIT_BITSET 9
-#define FUTEX_WAKE_BITSET 10
-#define FUTEX_PRIVATE_FLAG 128
-#define FUTEX_CLOCK_REALTIME 256
-
-#define FUTEX_BITSET_MATCH_ANY 0xffffffff
-
-/* Values for 'private' parameter of locking macros. Yes, the
- definition seems to be backwards. But it is not. The bit will be
- reversed before passing to the system call. */
-#define LLL_PRIVATE 0
-#define LLL_SHARED FUTEX_PRIVATE_FLAG
-
-
-#if !defined NOT_IN_libc || defined IS_IN_rtld
-/* In libc.so or ld.so all futexes are private. */
-# ifdef __ASSUME_PRIVATE_FUTEX
-# define __lll_private_flag(fl, private) \
- ((fl) | FUTEX_PRIVATE_FLAG)
-# else
-# define __lll_private_flag(fl, private) \
- ((fl) | THREAD_GETMEM (THREAD_SELF, header.private_futex))
-# endif
-#else
-# ifdef __ASSUME_PRIVATE_FUTEX
-# define __lll_private_flag(fl, private) \
- (((fl) | FUTEX_PRIVATE_FLAG) ^ (private))
-# else
-# define __lll_private_flag(fl, private) \
- (__builtin_constant_p (private) \
- ? ((private) == 0 \
- ? ((fl) | THREAD_GETMEM (THREAD_SELF, header.private_futex)) \
- : (fl)) \
- : ((fl) | (((private) ^ FUTEX_PRIVATE_FLAG) \
- & THREAD_GETMEM (THREAD_SELF, header.private_futex))))
-# endif
-#endif
-
-
-/* Delay in spinlock loop. */
-#define BUSY_WAIT_NOP asm ("hint @pause")
-
-#define lll_futex_wait(futex, val, private) \
- lll_futex_timed_wait (futex, val, NULL, private)
-
-#define lll_futex_timed_wait(ftx, val, timespec, private) \
-({ \
- DO_INLINE_SYSCALL(futex, 4, (long) (ftx), \
- __lll_private_flag (FUTEX_WAIT, private), \
- (int) (val), (long) (timespec)); \
- _r10 == -1 ? -_retval : _retval; \
-})
-
-#define lll_futex_wake(ftx, nr, private) \
-({ \
- DO_INLINE_SYSCALL(futex, 3, (long) (ftx), \
- __lll_private_flag (FUTEX_WAKE, private), \
- (int) (nr)); \
- _r10 == -1 ? -_retval : _retval; \
-})
-
-#define lll_robust_dead(futexv, private) \
-do \
- { \
- int *__futexp = &(futexv); \
- atomic_or (__futexp, FUTEX_OWNER_DIED); \
- DO_INLINE_SYSCALL(futex, 3, (long) __futexp, \
- __lll_private_flag (FUTEX_WAKE, private), 1); \
- } \
-while (0)
-
-/* Returns non-zero if error happened, zero if success. */
-#define lll_futex_requeue(ftx, nr_wake, nr_move, mutex, val, private) \
-({ \
- DO_INLINE_SYSCALL(futex, 6, (long) (ftx), \
- __lll_private_flag (FUTEX_CMP_REQUEUE, private), \
- (int) (nr_wake), (int) (nr_move), (long) (mutex), \
- (int) val); \
- _r10 == -1; \
-})
-
-/* Returns non-zero if error happened, zero if success. */
-#define lll_futex_wake_unlock(ftx, nr_wake, nr_wake2, ftx2, private) \
-({ \
- DO_INLINE_SYSCALL(futex, 6, (long) (ftx), \
- __lll_private_flag (FUTEX_WAKE_OP, private), \
- (int) (nr_wake), (int) (nr_wake2), (long) (ftx2), \
- FUTEX_OP_CLEAR_WAKE_IF_GT_ONE); \
- _r10 == -1; \
-})
-
-
-#define __lll_trylock(futex) \
- (atomic_compare_and_exchange_val_acq (futex, 1, 0) != 0)
-#define lll_trylock(futex) __lll_trylock (&(futex))
-
-
-#define __lll_robust_trylock(futex, id) \
- (atomic_compare_and_exchange_val_acq (futex, id, 0) != 0)
-#define lll_robust_trylock(futex, id) \
- __lll_robust_trylock (&(futex), id)
-
-
-#define __lll_cond_trylock(futex) \
- (atomic_compare_and_exchange_val_acq (futex, 2, 0) != 0)
-#define lll_cond_trylock(futex) __lll_cond_trylock (&(futex))
-
-
-extern void __lll_lock_wait_private (int *futex) attribute_hidden;
-extern void __lll_lock_wait (int *futex, int private) attribute_hidden;
-extern int __lll_robust_lock_wait (int *futex, int private) attribute_hidden;
-
-
-#define __lll_lock(futex, private) \
- ((void) ({ \
- int *__futex = (futex); \
- if (__builtin_expect (atomic_compare_and_exchange_bool_acq (__futex, \
- 1, 0), 0)) \
- { \
- if (__builtin_constant_p (private) && (private) == LLL_PRIVATE) \
- __lll_lock_wait_private (__futex); \
- else \
- __lll_lock_wait (__futex, private); \
- } \
- }))
-#define lll_lock(futex, private) __lll_lock (&(futex), private)
-
-
-#define __lll_robust_lock(futex, id, private) \
- ({ \
- int *__futex = (futex); \
- int __val = 0; \
- \
- if (__builtin_expect (atomic_compare_and_exchange_bool_acq (__futex, id, \
- 0), 0)) \
- __val = __lll_robust_lock_wait (__futex, private); \
- __val; \
- })
-#define lll_robust_lock(futex, id, private) \
- __lll_robust_lock (&(futex), id, private)
-
-
-#define __lll_cond_lock(futex, private) \
- ((void) ({ \
- int *__futex = (futex); \
- if (__builtin_expect (atomic_compare_and_exchange_bool_acq (__futex, 2, \
- 0), 0)) \
- __lll_lock_wait (__futex, private); \
- }))
-#define lll_cond_lock(futex, private) __lll_cond_lock (&(futex), private)
-
-
-#define __lll_robust_cond_lock(futex, id, private) \
- ({ \
- int *__futex = (futex); \
- int __val = 0; \
- int __id = (id) | FUTEX_WAITERS; \
- \
- if (__builtin_expect (atomic_compare_and_exchange_bool_acq (__futex, \
- __id, 0), 0)) \
- __val = __lll_robust_lock_wait (__futex, private); \
- __val; \
- })
-#define lll_robust_cond_lock(futex, id, private) \
- __lll_robust_cond_lock (&(futex), id, private)
-
-
-extern int __lll_timedlock_wait (int *futex, const struct timespec *,
- int private) attribute_hidden;
-extern int __lll_robust_timedlock_wait (int *futex, const struct timespec *,
- int private) attribute_hidden;
-
-
-#define __lll_timedlock(futex, abstime, private) \
- ({ \
- int *__futex = (futex); \
- int __val = 0; \
- \
- if (__builtin_expect (atomic_compare_and_exchange_bool_acq (__futex, 1, \
- 0), 0)) \
- __val = __lll_timedlock_wait (__futex, abstime, private); \
- __val; \
- })
-#define lll_timedlock(futex, abstime, private) \
- __lll_timedlock (&(futex), abstime, private)
-
-
-#define __lll_robust_timedlock(futex, abstime, id, private) \
- ({ \
- int *__futex = (futex); \
- int __val = 0; \
- \
- if (__builtin_expect (atomic_compare_and_exchange_bool_acq (__futex, id, \
- 0), 0)) \
- __val = __lll_robust_timedlock_wait (__futex, abstime, private); \
- __val; \
- })
-#define lll_robust_timedlock(futex, abstime, id, private) \
- __lll_robust_timedlock (&(futex), abstime, id, private)
-
-
-#define __lll_unlock(futex, private) \
- ((void) ({ \
- int *__futex = (futex); \
- int __val = atomic_exchange_rel (__futex, 0); \
- \
- if (__builtin_expect (__val > 1, 0)) \
- lll_futex_wake (__futex, 1, private); \
- }))
-#define lll_unlock(futex, private) __lll_unlock(&(futex), private)
-
-
-#define __lll_robust_unlock(futex, private) \
- ((void) ({ \
- int *__futex = (futex); \
- int __val = atomic_exchange_rel (__futex, 0); \
- \
- if (__builtin_expect (__val & FUTEX_WAITERS, 0)) \
- lll_futex_wake (__futex, 1, private); \
- }))
-#define lll_robust_unlock(futex, private) \
- __lll_robust_unlock(&(futex), private)
-
-
-#define lll_islocked(futex) \
- (futex != 0)
-
-/* Initializers for lock. */
-#define LLL_LOCK_INITIALIZER (0)
-#define LLL_LOCK_INITIALIZER_LOCKED (1)
-
-/* 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, LLL_SHARED); \
- } \
- 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; \
- })
-
-#endif /* lowlevellock.h */
diff --git a/libc/nptl/sysdeps/unix/sysv/linux/ia64/pt-initfini.c b/libc/nptl/sysdeps/unix/sysv/linux/ia64/pt-initfini.c
deleted file mode 100644
index b6d2cec0d..000000000
--- a/libc/nptl/sysdeps/unix/sysv/linux/ia64/pt-initfini.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/* Special .init and .fini section support for ia64. NPTL version.
- Copyright (C) 2000, 2001, 2002, 2003, 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.
-
- 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>
-
-
-__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\
-");
diff --git a/libc/nptl/sysdeps/unix/sysv/linux/ia64/pt-vfork.S b/libc/nptl/sysdeps/unix/sysv/linux/ia64/pt-vfork.S
deleted file mode 100644
index a28528003..000000000
--- a/libc/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/libc/nptl/sysdeps/unix/sysv/linux/ia64/pthread_once.c b/libc/nptl/sysdeps/unix/sysv/linux/ia64/pthread_once.c
deleted file mode 100644
index 22e2dd3c0..000000000
--- a/libc/nptl/sysdeps/unix/sysv/linux/ia64/pthread_once.c
+++ /dev/null
@@ -1,94 +0,0 @@
-/* Copyright (C) 2003, 2004, 2007 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, LLL_PRIVATE);
-}
-
-
-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, LLL_PRIVATE);
- 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, LLL_PRIVATE);
- break;
- }
-
- return 0;
-}
-weak_alias (__pthread_once, pthread_once)
-strong_alias (__pthread_once, __pthread_once_internal)
diff --git a/libc/nptl/sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h b/libc/nptl/sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
deleted file mode 100644
index 8687ba46a..000000000
--- a/libc/nptl/sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
+++ /dev/null
@@ -1,205 +0,0 @@
-/* Copyright (C) 2002, 2003, 2004, 2006, 2011 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
-
-# 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
-
-# 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
-
-#ifndef __ASSEMBLER__
-# define RTLD_SINGLE_THREAD_P \
- __builtin_expect (THREAD_GETMEM (THREAD_SELF, \
- header.multiple_threads) == 0, 1)
-#endif
diff --git a/libc/nptl/sysdeps/unix/sysv/linux/ia64/timer_create.c b/libc/nptl/sysdeps/unix/sysv/linux/ia64/timer_create.c
deleted file mode 100644
index 172223af3..000000000
--- a/libc/nptl/sysdeps/unix/sysv/linux/ia64/timer_create.c
+++ /dev/null
@@ -1 +0,0 @@
-#include "../x86_64/timer_create.c"
diff --git a/libc/nptl/sysdeps/unix/sysv/linux/ia64/timer_delete.c b/libc/nptl/sysdeps/unix/sysv/linux/ia64/timer_delete.c
deleted file mode 100644
index 537516e0a..000000000
--- a/libc/nptl/sysdeps/unix/sysv/linux/ia64/timer_delete.c
+++ /dev/null
@@ -1 +0,0 @@
-#include "../x86_64/timer_delete.c"
diff --git a/libc/nptl/sysdeps/unix/sysv/linux/ia64/timer_getoverr.c b/libc/nptl/sysdeps/unix/sysv/linux/ia64/timer_getoverr.c
deleted file mode 100644
index 3f21a73c9..000000000
--- a/libc/nptl/sysdeps/unix/sysv/linux/ia64/timer_getoverr.c
+++ /dev/null
@@ -1 +0,0 @@
-#include "../x86_64/timer_getoverr.c"
diff --git a/libc/nptl/sysdeps/unix/sysv/linux/ia64/timer_gettime.c b/libc/nptl/sysdeps/unix/sysv/linux/ia64/timer_gettime.c
deleted file mode 100644
index a50143adc..000000000
--- a/libc/nptl/sysdeps/unix/sysv/linux/ia64/timer_gettime.c
+++ /dev/null
@@ -1 +0,0 @@
-#include "../x86_64/timer_gettime.c"
diff --git a/libc/nptl/sysdeps/unix/sysv/linux/ia64/timer_settime.c b/libc/nptl/sysdeps/unix/sysv/linux/ia64/timer_settime.c
deleted file mode 100644
index 37baeffac..000000000
--- a/libc/nptl/sysdeps/unix/sysv/linux/ia64/timer_settime.c
+++ /dev/null
@@ -1 +0,0 @@
-#include "../x86_64/timer_settime.c"
diff --git a/libc/nptl/sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c b/libc/nptl/sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
deleted file mode 100644
index d0c77a62e..000000000
--- a/libc/nptl/sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/* Copyright (C) 2003, 2006 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/libc/nptl/sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c b/libc/nptl/sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c
deleted file mode 100644
index 7976ff8f1..000000000
--- a/libc/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/libc/nptl/sysdeps/unix/sysv/linux/ia64/vfork.S b/libc/nptl/sysdeps/unix/sysv/linux/ia64/vfork.S
deleted file mode 100644
index 3bd721f14..000000000
--- a/libc/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/libc/nptl/sysdeps/unix/sysv/linux/mq_notify.c b/libc/nptl/sysdeps/unix/sysv/linux/mq_notify.c
index 11ffc328e..bc4a01f18 100644
--- a/libc/nptl/sysdeps/unix/sysv/linux/mq_notify.c
+++ b/libc/nptl/sysdeps/unix/sysv/linux/mq_notify.c
@@ -30,6 +30,7 @@
#include <sys/socket.h>
#include <not-cancel.h>
#include <kernel-features.h>
+#include <nptl/pthreadP.h>
#ifdef __NR_mq_notify