summaryrefslogtreecommitdiff
path: root/sysdeps/nptl
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/nptl')
-rw-r--r--sysdeps/nptl/Makeconfig2
-rw-r--r--sysdeps/nptl/Makefile4
-rw-r--r--sysdeps/nptl/aio_misc.h2
-rw-r--r--sysdeps/nptl/allocrtsig.c2
-rw-r--r--sysdeps/nptl/configure87
-rw-r--r--sysdeps/nptl/configure.ac46
-rw-r--r--sysdeps/nptl/fork.c4
-rw-r--r--sysdeps/nptl/fork.h2
-rw-r--r--sysdeps/nptl/futex-internal.h2
-rw-r--r--sysdeps/nptl/gai_misc.h8
-rw-r--r--sysdeps/nptl/internaltypes.h17
-rw-r--r--sysdeps/nptl/jmp-unwind.c14
-rw-r--r--sysdeps/nptl/libc-lock.h (renamed from sysdeps/nptl/bits/libc-lock.h)8
-rw-r--r--sysdeps/nptl/libc-lockP.h (renamed from sysdeps/nptl/bits/libc-lockP.h)14
-rw-r--r--sysdeps/nptl/librt-cancellation.c2
-rw-r--r--sysdeps/nptl/lowlevellock-futex.h2
-rw-r--r--sysdeps/nptl/lowlevellock.h20
-rw-r--r--sysdeps/nptl/malloc-machine.h15
-rw-r--r--sysdeps/nptl/nptl-signals.h2
-rw-r--r--sysdeps/nptl/pthread-functions.h4
-rw-r--r--sysdeps/nptl/pthread.h2
-rw-r--r--sysdeps/nptl/setxid.h2
-rw-r--r--sysdeps/nptl/shm-directory.h2
-rw-r--r--sysdeps/nptl/sigfillset.c2
-rw-r--r--sysdeps/nptl/stdio-lock.h (renamed from sysdeps/nptl/bits/stdio-lock.h)10
-rw-r--r--sysdeps/nptl/sys/procfs.h2
-rw-r--r--sysdeps/nptl/unwind-forcedunwind.c2
27 files changed, 72 insertions, 207 deletions
diff --git a/sysdeps/nptl/Makeconfig b/sysdeps/nptl/Makeconfig
index 30f821ef34..2f4918d112 100644
--- a/sysdeps/nptl/Makeconfig
+++ b/sysdeps/nptl/Makeconfig
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2015 Free Software Foundation, Inc.
+# Copyright (C) 2002-2016 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
diff --git a/sysdeps/nptl/Makefile b/sysdeps/nptl/Makefile
index e9339a3e12..0dbbd72b27 100644
--- a/sysdeps/nptl/Makefile
+++ b/sysdeps/nptl/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2015 Free Software Foundation, Inc.
+# Copyright (C) 2002-2016 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
@@ -24,11 +24,9 @@ ifeq ($(subdir),rt)
librt-sysdep_routines += timer_routines librt-cancellation
CFLAGS-librt-cancellation.c += -fexceptions -fasynchronous-unwind-tables
-ifeq ($(have-forced-unwind),yes)
tests += tst-mqueue8x
CFLAGS-tst-mqueue8x.c += -fexceptions
endif
-endif
ifeq ($(subdir),posix)
CFLAGS-confstr.c += -DLIBPTHREAD_VERSION='"NPTL $(version)"'
diff --git a/sysdeps/nptl/aio_misc.h b/sysdeps/nptl/aio_misc.h
index 4a6ebfc9b3..a7a8a12060 100644
--- a/sysdeps/nptl/aio_misc.h
+++ b/sysdeps/nptl/aio_misc.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2006-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2006-2016 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
diff --git a/sysdeps/nptl/allocrtsig.c b/sysdeps/nptl/allocrtsig.c
index 7e3c62140b..ead2832d75 100644
--- a/sysdeps/nptl/allocrtsig.c
+++ b/sysdeps/nptl/allocrtsig.c
@@ -1,5 +1,5 @@
/* Handle real-time signal allocation. NPTL version.
- Copyright (C) 2015 Free Software Foundation, Inc.
+ Copyright (C) 2015-2016 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
diff --git a/sysdeps/nptl/configure b/sysdeps/nptl/configure
deleted file mode 100644
index cce07b35d2..0000000000
--- a/sysdeps/nptl/configure
+++ /dev/null
@@ -1,87 +0,0 @@
-# This file is generated from configure.ac by Autoconf. DO NOT EDIT!
-
-if test "x$libc_cv_gcc___thread" != xyes; then
- as_fn_error $? "compiler support for __thread is required" "$LINENO" 5
-fi
-
-if test "x${libc_cv_visibility_attribute}" != xyes ||
- test "x${libc_cv_broken_visibility_attribute}" != xno; then
- as_fn_error $? "working compiler support for visibility attribute is required" "$LINENO" 5
-fi
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for forced unwind support" >&5
-$as_echo_n "checking for forced unwind support... " >&6; }
-if ${libc_cv_forced_unwind+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- old_CPPFLAGS="$CPPFLAGS"
-# Without inhibit_libc #define'd, GCC's unwind.h (at least for ia64)
-# will try to include <stdlib.h>, which doesn't exist yet if we're
-# building libc in a bare environment.
-CPPFLAGS="$CPPFLAGS -Dinhibit_libc=1"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <unwind.h>
-int
-main ()
-{
-
-struct _Unwind_Exception exc;
-struct _Unwind_Context *context;
-_Unwind_GetCFA (context)
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- libc_cv_forced_unwind=yes
-else
- libc_cv_forced_unwind=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-CPPFLAGS="$old_CPPFLAGS"
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_forced_unwind" >&5
-$as_echo "$libc_cv_forced_unwind" >&6; }
-if test $libc_cv_forced_unwind = yes; then
- $as_echo "#define HAVE_FORCED_UNWIND 1" >>confdefs.h
-
- old_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -Werror -fexceptions"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C cleanup handling" >&5
-$as_echo_n "checking for C cleanup handling... " >&6; }
-if ${libc_cv_c_cleanup+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-extern void some_function (void);
-void cl (void *a) { }
-int
-main ()
-{
-
- int a __attribute__ ((cleanup (cl)));
- some_function ()
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- libc_cv_c_cleanup=yes
-else
- libc_cv_c_cleanup=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_c_cleanup" >&5
-$as_echo "$libc_cv_c_cleanup" >&6; }
- CFLAGS="$old_CFLAGS"
- if test $libc_cv_c_cleanup = no; then
- as_fn_error $? "the compiler must support C cleanup handling" "$LINENO" 5
- fi
-else
- as_fn_error $? "forced unwind support is required" "$LINENO" 5
-fi
diff --git a/sysdeps/nptl/configure.ac b/sysdeps/nptl/configure.ac
deleted file mode 100644
index 58032155cd..0000000000
--- a/sysdeps/nptl/configure.ac
+++ /dev/null
@@ -1,46 +0,0 @@
-dnl configure fragment for new libpthread implementation.
-GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
-
-if test "x$libc_cv_gcc___thread" != xyes; then
- AC_MSG_ERROR(compiler support for __thread is required)
-fi
-
-if test "x${libc_cv_visibility_attribute}" != xyes ||
- test "x${libc_cv_broken_visibility_attribute}" != xno; then
- AC_MSG_ERROR(working compiler support for visibility attribute is required)
-fi
-
-dnl Iff <unwind.h> is available, make sure it is the right one and it
-dnl contains struct _Unwind_Exception.
-AC_CACHE_CHECK(dnl
-for forced unwind support, libc_cv_forced_unwind, [dnl
-old_CPPFLAGS="$CPPFLAGS"
-# Without inhibit_libc #define'd, GCC's unwind.h (at least for ia64)
-# will try to include <stdlib.h>, which doesn't exist yet if we're
-# building libc in a bare environment.
-CPPFLAGS="$CPPFLAGS -Dinhibit_libc=1"
-AC_TRY_COMPILE([#include <unwind.h>], [
-struct _Unwind_Exception exc;
-struct _Unwind_Context *context;
-_Unwind_GetCFA (context)],
-libc_cv_forced_unwind=yes, libc_cv_forced_unwind=no)
-CPPFLAGS="$old_CPPFLAGS"])
-if test $libc_cv_forced_unwind = yes; then
- AC_DEFINE(HAVE_FORCED_UNWIND)
-dnl Check for C cleanup handling.
- old_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -Werror -fexceptions"
- AC_CACHE_CHECK([for C cleanup handling], libc_cv_c_cleanup, [dnl
- AC_TRY_COMPILE([
-extern void some_function (void);
-void cl (void *a) { }], [
- int a __attribute__ ((cleanup (cl)));
- some_function ()],
-libc_cv_c_cleanup=yes, libc_cv_c_cleanup=no)])
- CFLAGS="$old_CFLAGS"
- if test $libc_cv_c_cleanup = no; then
- AC_MSG_ERROR([the compiler must support C cleanup handling])
- fi
-else
- AC_MSG_ERROR(forced unwind support is required)
-fi
diff --git a/sysdeps/nptl/fork.c b/sysdeps/nptl/fork.c
index 2b9ae4b571..27f8d52e30 100644
--- a/sysdeps/nptl/fork.c
+++ b/sysdeps/nptl/fork.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
@@ -25,7 +25,7 @@
#include <tls.h>
#include <hp-timing.h>
#include <ldsodefs.h>
-#include <bits/stdio-lock.h>
+#include <stdio-lock.h>
#include <atomic.h>
#include <nptl/pthreadP.h>
#include <fork.h>
diff --git a/sysdeps/nptl/fork.h b/sysdeps/nptl/fork.h
index fe0daa2bb4..76762d4b1e 100644
--- a/sysdeps/nptl/fork.h
+++ b/sysdeps/nptl/fork.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
diff --git a/sysdeps/nptl/futex-internal.h b/sysdeps/nptl/futex-internal.h
index 4f8c8fe72d..d798b69708 100644
--- a/sysdeps/nptl/futex-internal.h
+++ b/sysdeps/nptl/futex-internal.h
@@ -1,6 +1,6 @@
/* futex operations for glibc-internal use. Stub version; do not include
this file directly.
- Copyright (C) 2014-2015 Free Software Foundation, Inc.
+ Copyright (C) 2014-2016 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
diff --git a/sysdeps/nptl/gai_misc.h b/sysdeps/nptl/gai_misc.h
index 96c8fa0f91..c550cdd85e 100644
--- a/sysdeps/nptl/gai_misc.h
+++ b/sysdeps/nptl/gai_misc.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2006-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2006-2016 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
@@ -81,7 +81,8 @@ __gai_start_notify_thread (void)
{
sigset_t ss;
sigemptyset (&ss);
- int sigerr = pthread_sigmask (SIG_SETMASK, &ss, NULL);
+ int sigerr __attribute__ ((unused));
+ sigerr = pthread_sigmask (SIG_SETMASK, &ss, NULL);
assert_perror (sigerr);
}
@@ -105,7 +106,8 @@ __gai_create_helper_thread (pthread_t *threadp, void *(*tf) (void *),
sigset_t ss;
sigset_t oss;
sigfillset (&ss);
- int sigerr = pthread_sigmask (SIG_SETMASK, &ss, &oss);
+ int sigerr __attribute__ ((unused));
+ sigerr = pthread_sigmask (SIG_SETMASK, &ss, &oss);
assert_perror (sigerr);
int ret = pthread_create (threadp, &attr, tf, arg);
diff --git a/sysdeps/nptl/internaltypes.h b/sysdeps/nptl/internaltypes.h
index 8f5cfa4af6..203c548550 100644
--- a/sysdeps/nptl/internaltypes.h
+++ b/sysdeps/nptl/internaltypes.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
@@ -92,15 +92,18 @@ struct pthread_rwlockattr
};
-/* Barrier data structure. */
+/* Barrier data structure. See pthread_barrier_wait for a description
+ of how these fields are used. */
struct pthread_barrier
{
- unsigned int curr_event;
- int lock;
- unsigned int left;
- unsigned int init_count;
- int private;
+ unsigned int in;
+ unsigned int current_round;
+ unsigned int count;
+ int shared;
+ unsigned int out;
};
+/* See pthread_barrier_wait for a description. */
+#define BARRIER_IN_THRESHOLD (UINT_MAX/2)
/* Barrier variable attribute data structure. */
diff --git a/sysdeps/nptl/jmp-unwind.c b/sysdeps/nptl/jmp-unwind.c
index 8e019867a7..ec227ada21 100644
--- a/sysdeps/nptl/jmp-unwind.c
+++ b/sysdeps/nptl/jmp-unwind.c
@@ -1,5 +1,5 @@
/* Clean up stack frames unwound by longjmp. Linux version.
- Copyright (C) 1995-2015 Free Software Foundation, Inc.
+ Copyright (C) 1995-2016 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
@@ -18,7 +18,7 @@
#include <setjmp.h>
#include <stddef.h>
-#include <nptl/pthreadP.h>
+#include <libc-lock.h>
extern void __pthread_cleanup_upto (__jmp_buf env, char *targetframe);
#pragma weak __pthread_cleanup_upto
@@ -27,12 +27,6 @@ extern void __pthread_cleanup_upto (__jmp_buf env, char *targetframe);
void
_longjmp_unwind (jmp_buf env, int val)
{
-#ifdef SHARED
- if (__libc_pthread_functions_init)
- PTHFCT_CALL (ptr___pthread_cleanup_upto, (env->__jmpbuf,
- CURRENT_STACK_FRAME));
-#else
- if (__pthread_cleanup_upto != NULL)
- __pthread_cleanup_upto (env->__jmpbuf, CURRENT_STACK_FRAME);
-#endif
+ __libc_ptf_call (__pthread_cleanup_upto, (env->__jmpbuf,
+ CURRENT_STACK_FRAME), 0);
}
diff --git a/sysdeps/nptl/bits/libc-lock.h b/sysdeps/nptl/libc-lock.h
index 5599cf1734..db11456b38 100644
--- a/sysdeps/nptl/bits/libc-lock.h
+++ b/sysdeps/nptl/libc-lock.h
@@ -1,5 +1,5 @@
/* libc-internal interface for mutex locks. NPTL version.
- Copyright (C) 1996-2015 Free Software Foundation, Inc.
+ Copyright (C) 1996-2016 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
@@ -16,8 +16,8 @@
License along with the GNU C Library; see the file COPYING.LIB. If
not, see <http://www.gnu.org/licenses/>. */
-#ifndef _BITS_LIBC_LOCK_H
-#define _BITS_LIBC_LOCK_H 1
+#ifndef _LIBC_LOCK_H
+#define _LIBC_LOCK_H 1
#include <pthread.h>
#define __need_NULL
@@ -184,4 +184,4 @@ extern void _pthread_cleanup_pop_restore (struct _pthread_cleanup_buffer *buffer
# include "libc-lockP.h"
#endif
-#endif /* bits/libc-lock.h */
+#endif /* libc-lock.h */
diff --git a/sysdeps/nptl/bits/libc-lockP.h b/sysdeps/nptl/libc-lockP.h
index f55f6212ec..50b86d2225 100644
--- a/sysdeps/nptl/bits/libc-lockP.h
+++ b/sysdeps/nptl/libc-lockP.h
@@ -1,5 +1,5 @@
/* Private libc-internal interface for mutex locks. NPTL version.
- Copyright (C) 1996-2015 Free Software Foundation, Inc.
+ Copyright (C) 1996-2016 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
@@ -16,8 +16,8 @@
License along with the GNU C Library; see the file COPYING.LIB. If
not, see <http://www.gnu.org/licenses/>. */
-#ifndef _BITS_LIBC_LOCKP_H
-#define _BITS_LIBC_LOCKP_H 1
+#ifndef _LIBC_LOCKP_H
+#define _LIBC_LOCKP_H 1
#include <pthread.h>
#define __need_NULL
@@ -75,6 +75,7 @@ typedef pthread_key_t __libc_key_t;
initialized locks must be set to one due to the lack of normal
atomic operations.) */
+#define _LIBC_LOCK_INITIALIZER LLL_LOCK_INITIALIZER
#if IS_IN (libc) || IS_IN (libpthread)
# if LLL_LOCK_INITIALIZER == 0
# define __libc_lock_define_initialized(CLASS,NAME) \
@@ -376,6 +377,7 @@ extern int __pthread_atfork (void (*__prepare) (void),
void (*__parent) (void),
void (*__child) (void));
+extern int __pthread_setcancelstate (int state, int *oldstate);
/* Make the pthread functions weak so that we can elide them from
@@ -403,9 +405,9 @@ weak_extern (__pthread_getspecific)
weak_extern (__pthread_once)
weak_extern (__pthread_initialize)
weak_extern (__pthread_atfork)
+weak_extern (__pthread_setcancelstate)
weak_extern (_pthread_cleanup_push_defer)
weak_extern (_pthread_cleanup_pop_restore)
-weak_extern (pthread_setcancelstate)
# else
# pragma weak __pthread_mutex_init
# pragma weak __pthread_mutex_destroy
@@ -427,10 +429,10 @@ weak_extern (pthread_setcancelstate)
# pragma weak __pthread_once
# pragma weak __pthread_initialize
# pragma weak __pthread_atfork
+# pragma weak __pthread_setcancelstate
# pragma weak _pthread_cleanup_push_defer
# pragma weak _pthread_cleanup_pop_restore
-# pragma weak pthread_setcancelstate
# endif
#endif
-#endif /* bits/libc-lockP.h */
+#endif /* libc-lockP.h */
diff --git a/sysdeps/nptl/librt-cancellation.c b/sysdeps/nptl/librt-cancellation.c
index facfbdb49a..ce5a627b67 100644
--- a/sysdeps/nptl/librt-cancellation.c
+++ b/sysdeps/nptl/librt-cancellation.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
diff --git a/sysdeps/nptl/lowlevellock-futex.h b/sysdeps/nptl/lowlevellock-futex.h
index a095ad9fe3..9a976364f1 100644
--- a/sysdeps/nptl/lowlevellock-futex.h
+++ b/sysdeps/nptl/lowlevellock-futex.h
@@ -1,5 +1,5 @@
/* Low-level locking access to futex facilities. Stub version.
- Copyright (C) 2014-2015 Free Software Foundation, Inc.
+ Copyright (C) 2014-2016 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
diff --git a/sysdeps/nptl/lowlevellock.h b/sysdeps/nptl/lowlevellock.h
index 27f41424ea..3890145402 100644
--- a/sysdeps/nptl/lowlevellock.h
+++ b/sysdeps/nptl/lowlevellock.h
@@ -1,5 +1,5 @@
/* Low-level lock implementation. Generic futex-based version.
- Copyright (C) 2005-2015 Free Software Foundation, Inc.
+ Copyright (C) 2005-2016 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
@@ -191,14 +191,21 @@ extern int __lll_robust_timedlock_wait (int *futex, const struct timespec *,
that's cast to void. */
/* Unconditionally set FUTEX to 0 (not acquired), releasing the lock. If FUTEX
was >1 (acquired, possibly with waiters), then wake any waiters. The waiter
- that acquires the lock will set FUTEX to >1. */
+ that acquires the lock will set FUTEX to >1.
+ Evaluate PRIVATE before releasing the lock so that we do not violate the
+ mutex destruction requirements. Specifically, we need to ensure that
+ another thread can destroy the mutex (and reuse its memory) once it
+ acquires the lock and when there will be no further lock acquisitions;
+ thus, we must not access the lock after releasing it, or those accesses
+ could be concurrent with mutex destruction or reuse of the memory. */
#define __lll_unlock(futex, private) \
((void) \
({ \
int *__futex = (futex); \
+ int __private = (private); \
int __oldval = atomic_exchange_rel (__futex, 0); \
if (__glibc_unlikely (__oldval > 1)) \
- lll_futex_wake (__futex, 1, private); \
+ lll_futex_wake (__futex, 1, __private); \
}))
#define lll_unlock(futex, private) \
__lll_unlock (&(futex), private)
@@ -209,14 +216,17 @@ extern int __lll_robust_timedlock_wait (int *futex, const struct timespec *,
that's cast to void. */
/* Unconditionally set FUTEX to 0 (not acquired), releasing the lock. If FUTEX
had FUTEX_WAITERS set then wake any waiters. The waiter that acquires the
- lock will set FUTEX_WAITERS. */
+ lock will set FUTEX_WAITERS.
+ Evaluate PRIVATE before releasing the lock so that we do not violate the
+ mutex destruction requirements (see __lll_unlock). */
#define __lll_robust_unlock(futex, private) \
((void) \
({ \
int *__futex = (futex); \
+ int __private = (private); \
int __oldval = atomic_exchange_rel (__futex, 0); \
if (__glibc_unlikely (__oldval & FUTEX_WAITERS)) \
- lll_futex_wake (__futex, 1, private); \
+ lll_futex_wake (__futex, 1, __private); \
}))
#define lll_robust_unlock(futex, private) \
__lll_robust_unlock (&(futex), private)
diff --git a/sysdeps/nptl/malloc-machine.h b/sysdeps/nptl/malloc-machine.h
index 27c9911d17..5b276dfeb4 100644
--- a/sysdeps/nptl/malloc-machine.h
+++ b/sysdeps/nptl/malloc-machine.h
@@ -1,6 +1,6 @@
/* Basic platform-independent macro definitions for mutexes,
thread-specific data and parameters for malloc.
- Copyright (C) 2003-2015 Free Software Foundation, Inc.
+ Copyright (C) 2003-2016 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
@@ -23,7 +23,7 @@
#undef thread_atfork_static
#include <atomic.h>
-#include <bits/libc-lock.h>
+#include <libc-lock.h>
__libc_lock_define (typedef, mutex_t)
@@ -31,7 +31,6 @@ __libc_lock_define (typedef, mutex_t)
#define mutex_lock(m) __libc_lock_lock (*(m))
#define mutex_trylock(m) __libc_lock_trylock (*(m))
#define mutex_unlock(m) __libc_lock_unlock (*(m))
-#define MUTEX_INITIALIZER LLL_LOCK_INITIALIZER
/* This is defined by newer gcc version unique for each module. */
extern void *__dso_handle __attribute__ ((__weak__));
@@ -58,16 +57,6 @@ extern void *__dso_handle __attribute__ ((__weak__));
__linkin_atfork (&atfork_mem)
#endif
-/* thread specific data for glibc */
-
-#include <bits/libc-tsd.h>
-
-typedef int tsd_key_t[1]; /* no key data structure, libc magic does it */
-__libc_tsd_define (static, void *, MALLOC) /* declaration/common definition */
-#define tsd_key_create(key, destr) ((void) (key))
-#define tsd_setspecific(key, data) __libc_tsd_set (void *, MALLOC, (data))
-#define tsd_getspecific(key, vptr) ((vptr) = __libc_tsd_get (void *, MALLOC))
-
#include <sysdeps/generic/malloc-machine.h>
#endif /* !defined(_MALLOC_MACHINE_H) */
diff --git a/sysdeps/nptl/nptl-signals.h b/sysdeps/nptl/nptl-signals.h
index a8f275c956..74e7df395c 100644
--- a/sysdeps/nptl/nptl-signals.h
+++ b/sysdeps/nptl/nptl-signals.h
@@ -1,5 +1,5 @@
/* Special use of signals in NPTL internals. Stub version.
- Copyright (C) 2014-2015 Free Software Foundation, Inc.
+ Copyright (C) 2014-2016 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
diff --git a/sysdeps/nptl/pthread-functions.h b/sysdeps/nptl/pthread-functions.h
index 0784c59cab..60f0ad566b 100644
--- a/sysdeps/nptl/pthread-functions.h
+++ b/sysdeps/nptl/pthread-functions.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2003-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
@@ -75,7 +75,7 @@ struct pthread_functions
int (*ptr_pthread_mutex_lock) (pthread_mutex_t *);
int (*ptr_pthread_mutex_unlock) (pthread_mutex_t *);
pthread_t (*ptr_pthread_self) (void);
- int (*ptr_pthread_setcancelstate) (int, int *);
+ int (*ptr___pthread_setcancelstate) (int, int *);
int (*ptr_pthread_setcanceltype) (int, int *);
void (*ptr___pthread_cleanup_upto) (__jmp_buf, char *);
int (*ptr___pthread_once) (pthread_once_t *, void (*) (void));
diff --git a/sysdeps/nptl/pthread.h b/sysdeps/nptl/pthread.h
index 89d08823f5..fd0894efd2 100644
--- a/sysdeps/nptl/pthread.h
+++ b/sysdeps/nptl/pthread.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2016 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
diff --git a/sysdeps/nptl/setxid.h b/sysdeps/nptl/setxid.h
index a3ecb60496..916ec43709 100644
--- a/sysdeps/nptl/setxid.h
+++ b/sysdeps/nptl/setxid.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2004-2016 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
diff --git a/sysdeps/nptl/shm-directory.h b/sysdeps/nptl/shm-directory.h
index a0835bfbdd..dfe5925b42 100644
--- a/sysdeps/nptl/shm-directory.h
+++ b/sysdeps/nptl/shm-directory.h
@@ -1,5 +1,5 @@
/* Header for directory for shm/sem files. NPTL version.
- Copyright (C) 2014-2015 Free Software Foundation, Inc.
+ Copyright (C) 2014-2016 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
diff --git a/sysdeps/nptl/sigfillset.c b/sysdeps/nptl/sigfillset.c
index b5d07a89ce..1c29fa445e 100644
--- a/sysdeps/nptl/sigfillset.c
+++ b/sysdeps/nptl/sigfillset.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2003-2016 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
diff --git a/sysdeps/nptl/bits/stdio-lock.h b/sysdeps/nptl/stdio-lock.h
index 8adf0319c4..d3a9092459 100644
--- a/sysdeps/nptl/bits/stdio-lock.h
+++ b/sysdeps/nptl/stdio-lock.h
@@ -1,5 +1,5 @@
/* Thread package specific definitions of stream lock type. NPTL version.
- Copyright (C) 2000-2015 Free Software Foundation, Inc.
+ Copyright (C) 2000-2016 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
@@ -16,10 +16,10 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#ifndef _BITS_STDIO_LOCK_H
-#define _BITS_STDIO_LOCK_H 1
+#ifndef _STDIO_LOCK_H
+#define _STDIO_LOCK_H 1
-#include <bits/libc-lock.h>
+#include <libc-lock.h>
#include <lowlevellock.h>
@@ -107,4 +107,4 @@ typedef struct { int lock; int cnt; void *owner; } _IO_lock_t;
#endif
-#endif /* bits/stdio-lock.h */
+#endif /* stdio-lock.h */
diff --git a/sysdeps/nptl/sys/procfs.h b/sysdeps/nptl/sys/procfs.h
index 6fead1f743..66cc2c9b9e 100644
--- a/sysdeps/nptl/sys/procfs.h
+++ b/sysdeps/nptl/sys/procfs.h
@@ -1,5 +1,5 @@
/* Types used by thread_db callback interface. Stub version.
- Copyright (C) 2015 Free Software Foundation, Inc.
+ Copyright (C) 2015-2016 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
diff --git a/sysdeps/nptl/unwind-forcedunwind.c b/sysdeps/nptl/unwind-forcedunwind.c
index 55768a5491..ca757c48ce 100644
--- a/sysdeps/nptl/unwind-forcedunwind.c
+++ b/sysdeps/nptl/unwind-forcedunwind.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2003-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>.