diff mbox series

[4/6] Add C11 threads support

Message ID 1490103612-9401-5-git-send-email-adhemerval.zanella@linaro.org
State Superseded
Headers show
Series Add support for ISO C11 threads.h | expand

Commit Message

Adhemerval Zanella Netto March 21, 2017, 1:40 p.m. UTC
This patch adds C11 threads support (ISO/IEC 9899:2011) based on the
public available n1570 [1].  Since I do not have access to the official
ISO documentation I would ask if there any deviation from the draft
to final doc regarding threads.h please let me know.  However based on
Joseph's comments on a old thread [2] I would expect to N1570 and final
standart to not have any technical differences.

Mostly of the definition required are defined based on POSIX counterparts,
such as thrd_t (pthread_t), once_flag (pthread_once_t), tss_t (pthread_key_t).
The mut_t and cnd_t is also based on internal pthreads fields, but with a
distinct internal layout to avoid possible issues with code interchange
(such as trying to pass POSIX structure on C11 functions and to avoid inclusion
of pthread.h).  The idea is to make it possible to share POSIX internal
implementation for mostly of the code making adjust where only required.

For mostly symbol implementations, direct POSIX pthread internal calls
are used with some exceptions:

  1. thrd_start uses pthread_create internal implementation, but changes
     how to actually calls the start routine.  This is due the difference
     in signature between POSIX and C11, where former return a 'void *'
     and latter 'int'.
     To avoid calling convention issues due 'void *' to int cast, routines
     from C11 threads are started slight different than default pthread one.
     Explicit cast to expected return are used internally on pthread_create
     and the result is stored back to void also with an explicit cast.

  2. thrd_sleep uses nanosleep internal direct syscall to avoid clobbering
     errno and to handle expected standard return codes.

  3. thrd_yield also uses internal direct syscall to avoid errno clobbering.

Checked with a build for all major ABI (aarch64-linux-gnu, alpha-linux-gnu,
arm-linux-gnueabi, hppa-linux-gnu, i386-linux-gnu, ia64-linux-gnu,
m68k-linux-gnu, microblaze-linux-gnu [1], mips{64}-linux-gnu, nios2-linux-gnu,
powerpc{64le}-linux-gnu, s390{x}-linux-gnu, sparc{64}-linux-gnu,
tile{pro,gx}-linux-gnu, and x86_64-linux-gnu).

Also ran a full check on aarch64-linux-gnu, x86_64-linux-gnu, i686-linux-gnu,
arm-linux-gnueabhf, and powerpc64le-linux-gnu.

[1] http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf
[2] https://sourceware.org/ml/libc-alpha/2011-12/msg00060.html

	* conform/Makefile (conformtest-headers-ISO11): Add threads.h.
	(linknamespace-libs-ISO11): Add libpthread.a.
	* include/stdc-predef.h (__STDC_NO_THREADS__): Remove definition.
	* nptl/Makefile (headers): Add threads.h.
	(libpthread-routines): Add new C11 thread objects.
	* nptl/Versions (libpthread) [GLIBC_2.25]): Add C11 thread symbols.
	* conform/data/threads.h-data: New file.
	* nptl/call_once.c: Likewise.
	* nptl/cnd_broadcast.c: Likewise.
	* nptl/cnd_destroy.c: Likewise.
	* nptl/cnd_init.c: Likewise.
	* nptl/cnd_signal.c: Likewise.
	* nptl/cnd_timedwait.c: Likewise.
	* nptl/cnd_wait.c: Likewise.
	* nptl/mtx_destroy.c: Likewise.
	* nptl/mtx_init.c: Likewise.
	* nptl/mtx_lock.c: Likewise.
	* nptl/mtx_timedlock.c: Likewise.
	* nptl/mtx_trylock.c: Likewise.
	* nptl/mtx_unlock.c: Likewise.
	* nptl/thrd_create.c: Likewise.
	* nptl/thrd_current.c: Likewise.
	* nptl/thrd_detach.c: Likewise.
	* nptl/thrd_equal.c: Likewise.
	* nptl/thrd_exit.c: Likewise.
	* nptl/thrd_join.c: Likewise.
	* nptl/thrd_priv.h: Likewise.
	* nptl/thrd_sleep.c: Likewise.
	* nptl/thrd_yield.c: Likewise.
	* nptl/tss_create.c: Likewise.
	* nptl/tss_delete.c: Likewise.
	* nptl/tss_get.c: Likewise.
	* nptl/tss_set.c: Likewise.
	* nptl/descr.h (pthread): Add c11 field.
	* nptl/pthreadP.h (ATTR_C11_THREAD): New define.
	* nptl/pthread_create.c (START_THREAD_DEFN): Call C11 thread start
	routine with expected function prototype.
	(__pthread_create_2_1): Add C11 threads check based on attribute
	value.
	* sysdeps/nptl/threads.h: New file.
	* sysdeps/i386/nptl/tls.h (CALL_THREAD_FCT): Add C11 support.
	* sysdeps/x86_64/nptl/tls.h (CALL_THREAD_FCT): Likewise.
	* sysdeps/x86_64/x32/nptl/tls.h (CALL_THREAD_FCT): Likewise.
	* sysdeps/aarch64/nptl/bits/thread-shared-types.h (_ONCE_FLAG_ALIGN):
	New define.
	* sysdeps/alpha/nptl/bits/thread-shared-types.h (_ONCE_FLAG_ALIGN):
	Likewise.
	* sysdeps/arm/nptl/bits/thread-shared-types.h (_ONCE_FLAG_ALIGN):
	Likewise.
	* sysdeps/hppa/nptl/bits/thread-shared-types.h (_ONCE_FLAG_ALIGN):
	Likewise.
	* sysdeps/ia64/nptl/bits/thread-shared-types.h (_ONCE_FLAG_ALIGN):
	Likewise.
	* sysdeps/m68k/nptl/bits/thread-shared-types.h (_ONCE_FLAG_ALIGN):
	Likewise.
	* sysdeps/microblaze/nptl/bits/thread-shared-types.h
	(_ONCE_FLAG_ALIGN): Likewise.
	* sysdeps/mips/nptl/bits/thread-shared-types.h (_ONCE_FLAG_ALIGN):
	Likewise.
	* sysdeps/nios2/nptl/bits/thread-shared-types.h (_ONCE_FLAG_ALIGN):
	Likewise.
	* sysdeps/powerpc/nptl/bits/thread-shared-types.h (_ONCE_FLAG_ALIGN):
	Likewise.
	* sysdeps/s390/nptl/bits/thread-shared-types.h (_ONCE_FLAG_ALIGN):
	Likewise.
	* sysdeps/sh/nptl/bits/thread-shared-types.h (_ONCE_FLAG_ALIGN):
	Likewise.
	* sysdeps/sparc/nptl/bits/thread-shared-types.h (_ONCE_FLAG_ALIGN):
	Likewise.
	* sysdeps/tile/nptl/bits/thread-shared-types.h (_ONCE_FLAG_ALIGN):
	Likewise.
	* sysdeps/x86/nptl/bits/thread-shared-types.h (_ONCE_FLAG_ALIGN):
	Likewise.
	* sysdeps/nacl/libpthread.abilist: Add C11 thread symbols.
	* sysdeps/unix/sysv/linux/aarch64/libpthread.abilist: Likewise.
	* sysdeps/unix/sysv/linux/alpha/libpthread.abilist: Likewise.
	* sysdeps/unix/sysv/linux/arm/libpthread.abilist: Likewise.
	* sysdeps/unix/sysv/linux/hppa/libpthread.abilist: Likewise.
	* sysdeps/unix/sysv/linux/i386/libpthread.abilist: Likewise.
	* sysdeps/unix/sysv/linux/ia64/libpthread.abilist: Likewise.
	* sysdeps/unix/sysv/linux/m68k/m680x0/libpthread.abilist: Likewise.
	* sysdeps/unix/sysv/linux/m68k/coldfire/libpthread.abilist: Likewise.
	* sysdeps/unix/sysv/linux/microblaze/libpthread.abilist: Likewise.
	* sysdeps/unix/sysv/linux/mips/mips32/libpthread.abilist: Likewise.
	* sysdeps/unix/sysv/linux/mips/mips64/libpthread.abilist: Likewise.
	* sysdeps/unix/sysv/linux/nios2/libpthread.abilist: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/libpthread.abilist:
	Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/libpthread-le.abilist:
	Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/libpthread.abilist:
	Likewise.
	* sysdpes/unix/sysv/linux/s390/s390-32/libpthread.abilist: Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-64/libpthread.abilist: Likewise.
	* sysdeps/unix/sysv/linux/sh/libpthread.abilist: Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc32/libpthread.abilist: Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc64/libpthread.abilist: Likewise.
	* sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/libpthread.abilist:
	Likewise.
	* sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/libpthread.abilist:
	Likewise.
	* sysdeps/unix/sysv/linux/tile/tilepro/libpthread.abilist: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/64/libpthread.abilist: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/x32/libpthread.abilist: Likewise.
---
 ChangeLog                                          | 105 +++++++++++
 conform/Makefile                                   |   7 +-
 conform/data/threads.h-data                        |  56 ++++++
 include/stdc-predef.h                              |   3 -
 nptl/Makefile                                      |  12 +-
 nptl/Versions                                      |  16 ++
 nptl/call_once.c                                   |  27 +++
 nptl/cnd_broadcast.c                               |  28 +++
 nptl/cnd_destroy.c                                 |  28 +++
 nptl/cnd_init.c                                    |  27 +++
 nptl/cnd_signal.c                                  |  28 +++
 nptl/cnd_timedwait.c                               |  32 ++++
 nptl/cnd_wait.c                                    |  28 +++
 nptl/descr.h                                       |   1 +
 nptl/mtx_destroy.c                                 |  27 +++
 nptl/mtx_init.c                                    |  48 +++++
 nptl/mtx_lock.c                                    |  29 +++
 nptl/mtx_timedlock.c                               |  31 ++++
 nptl/mtx_trylock.c                                 |  29 +++
 nptl/mtx_unlock.c                                  |  28 +++
 nptl/pthreadP.h                                    |   3 +
 nptl/pthread_create.c                              |  21 ++-
 nptl/thrd_create.c                                 |  30 ++++
 nptl/thrd_current.c                                |  26 +++
 nptl/thrd_detach.c                                 |  30 ++++
 nptl/thrd_equal.c                                  |  26 +++
 nptl/thrd_exit.c                                   |  27 +++
 nptl/thrd_join.c                                   |  32 ++++
 nptl/thrd_priv.h                                   |  46 +++++
 nptl/thrd_sleep.c                                  |  41 +++++
 nptl/thrd_yield.c                                  |  29 +++
 nptl/tss_create.c                                  |  29 +++
 nptl/tss_delete.c                                  |  27 +++
 nptl/tss_get.c                                     |  27 +++
 nptl/tss_set.c                                     |  28 +++
 sysdeps/aarch64/nptl/bits/thread-shared-types.h    |   3 +
 sysdeps/alpha/nptl/bits/thread-shared-types.h      |   3 +
 sysdeps/arm/nptl/bits/thread-shared-types.h        |   3 +
 sysdeps/hppa/nptl/bits/thread-shared-types.h       |   3 +
 sysdeps/i386/nptl/tls.h                            |   2 +-
 sysdeps/ia64/nptl/bits/thread-shared-types.h       |   3 +
 sysdeps/m68k/nptl/bits/thread-shared-types.h       |   3 +
 sysdeps/microblaze/nptl/bits/thread-shared-types.h |   3 +
 sysdeps/mips/nptl/bits/thread-shared-types.h       |   3 +
 sysdeps/nacl/libpthread.abilist                    |  26 +++
 sysdeps/nios2/nptl/bits/thread-shared-types.h      |   3 +
 sysdeps/nptl/threads.h                             | 198 +++++++++++++++++++++
 sysdeps/powerpc/nptl/bits/thread-shared-types.h    |   3 +
 sysdeps/s390/nptl/bits/thread-shared-types.h       |   3 +
 sysdeps/sh/nptl/bits/thread-shared-types.h         |   4 +
 sysdeps/sparc/nptl/bits/thread-shared-types.h      |   4 +
 sysdeps/tile/nptl/bits/thread-shared-types.h       |   4 +
 sysdeps/unix/sysv/linux/aarch64/libpthread.abilist |  26 +++
 sysdeps/unix/sysv/linux/alpha/libpthread.abilist   |  26 +++
 sysdeps/unix/sysv/linux/arm/libpthread.abilist     |  26 +++
 sysdeps/unix/sysv/linux/hppa/libpthread.abilist    |  26 +++
 sysdeps/unix/sysv/linux/i386/libpthread.abilist    |  26 +++
 sysdeps/unix/sysv/linux/ia64/libpthread.abilist    |  26 +++
 .../sysv/linux/m68k/coldfire/libpthread.abilist    |  26 +++
 .../unix/sysv/linux/m68k/m680x0/libpthread.abilist |  26 +++
 .../unix/sysv/linux/microblaze/libpthread.abilist  |  26 +++
 .../unix/sysv/linux/mips/mips32/libpthread.abilist |  26 +++
 .../unix/sysv/linux/mips/mips64/libpthread.abilist |  26 +++
 sysdeps/unix/sysv/linux/nios2/libpthread.abilist   |  26 +++
 .../linux/powerpc/powerpc32/libpthread.abilist     |  26 +++
 .../linux/powerpc/powerpc64/libpthread-le.abilist  |  26 +++
 .../linux/powerpc/powerpc64/libpthread.abilist     |  26 +++
 .../sysv/linux/s390/s390-32/libpthread.abilist     |  26 +++
 .../sysv/linux/s390/s390-64/libpthread.abilist     |  26 +++
 sysdeps/unix/sysv/linux/sh/libpthread.abilist      |  26 +++
 .../sysv/linux/sparc/sparc32/libpthread.abilist    |  26 +++
 .../sysv/linux/sparc/sparc64/libpthread.abilist    |  26 +++
 .../linux/tile/tilegx/tilegx32/libpthread.abilist  |  26 +++
 .../linux/tile/tilegx/tilegx64/libpthread.abilist  |  26 +++
 .../sysv/linux/tile/tilepro/libpthread.abilist     |  26 +++
 .../unix/sysv/linux/x86_64/64/libpthread.abilist   |  26 +++
 .../unix/sysv/linux/x86_64/x32/libpthread.abilist  |  26 +++
 sysdeps/x86/nptl/bits/thread-shared-types.h        |   3 +
 sysdeps/x86_64/nptl/tls.h                          |   6 +-
 sysdeps/x86_64/x32/nptl/tls.h                      |   2 +-
 80 files changed, 1928 insertions(+), 16 deletions(-)
 create mode 100644 conform/data/threads.h-data
 create mode 100644 nptl/call_once.c
 create mode 100644 nptl/cnd_broadcast.c
 create mode 100644 nptl/cnd_destroy.c
 create mode 100644 nptl/cnd_init.c
 create mode 100644 nptl/cnd_signal.c
 create mode 100644 nptl/cnd_timedwait.c
 create mode 100644 nptl/cnd_wait.c
 create mode 100644 nptl/mtx_destroy.c
 create mode 100644 nptl/mtx_init.c
 create mode 100644 nptl/mtx_lock.c
 create mode 100644 nptl/mtx_timedlock.c
 create mode 100644 nptl/mtx_trylock.c
 create mode 100644 nptl/mtx_unlock.c
 create mode 100644 nptl/thrd_create.c
 create mode 100644 nptl/thrd_current.c
 create mode 100644 nptl/thrd_detach.c
 create mode 100644 nptl/thrd_equal.c
 create mode 100644 nptl/thrd_exit.c
 create mode 100644 nptl/thrd_join.c
 create mode 100644 nptl/thrd_priv.h
 create mode 100644 nptl/thrd_sleep.c
 create mode 100644 nptl/thrd_yield.c
 create mode 100644 nptl/tss_create.c
 create mode 100644 nptl/tss_delete.c
 create mode 100644 nptl/tss_get.c
 create mode 100644 nptl/tss_set.c
 create mode 100644 sysdeps/nptl/threads.h

-- 
2.7.4
diff mbox series

Patch

diff --git a/conform/Makefile b/conform/Makefile
index b393641..dc3a030 100644
--- a/conform/Makefile
+++ b/conform/Makefile
@@ -34,9 +34,9 @@  conformtest-headers-ISO := assert.h ctype.h errno.h float.h limits.h locale.h \
 conformtest-headers-ISO99 := $(conformtest-headers-ISO) complex.h fenv.h \
 			     inttypes.h iso646.h stdbool.h stdint.h tgmath.h \
 			     wchar.h wctype.h
-# Missing ISO11 expectations for: stdatomic.h threads.h.
+# Missing ISO11 expectations for: stdatomic.h
 conformtest-headers-ISO11 := $(conformtest-headers-ISO99) stdalign.h \
-			     stdnoreturn.h uchar.h
+			     stdnoreturn.h uchar.h threads.h
 conformtest-headers-POSIX := $(conformtest-headers-ISO) aio.h dirent.h \
 			     fcntl.h fnmatch.h glob.h grp.h mqueue.h \
 			     pthread.h pwd.h regex.h sched.h semaphore.h \
@@ -217,7 +217,8 @@  linknamespace-libs-xsi = $(linknamespace-libs-posix) \
 			 $(common-objpfx)crypt/libcrypt.a
 linknamespace-libs-ISO = $(linknamespace-libs-isoc)
 linknamespace-libs-ISO99 = $(linknamespace-libs-isoc)
-linknamespace-libs-ISO11 = $(linknamespace-libs-isoc)
+linknamespace-libs-ISO11 = $(linknamespace-libs-isoc) \
+			   $(common-objpfx)nptl/libpthread.a
 linknamespace-libs-XPG3 = $(linknamespace-libs-isoc) \
 			  $(common-objpfx)crypt/libcrypt.a
 linknamespace-libs-XPG4 = $(linknamespace-libs-XPG3)
diff --git a/conform/data/threads.h-data b/conform/data/threads.h-data
new file mode 100644
index 0000000..a4a0ac1
--- /dev/null
+++ b/conform/data/threads.h-data
@@ -0,0 +1,56 @@ 
+#if defined ISO11
+
+macro ONCE_FLAG_INIT
+macro thread_local
+macro TSS_DTOR_ITERATIONS
+
+constant thrd_success
+constant thrd_busy
+constant thrd_error
+constant thrd_nomem
+constant thrd_timedout
+
+constant mtx_plain
+constant mtx_recursive
+constant mtx_timed
+
+type thrd_t
+type thrd_start_t
+type mtx_t
+type cnd_t
+type once_flag
+type tss_t
+type tss_dtor_t
+
+function int thrd_create (thrd_t*, thrd_start_t, void*)
+function int thrd_equal (thrd_t, thrd_t)
+function thrd_t thrd_current (void)
+function int thrd_sleep (const struct timespec*, struct timespec*)
+function void thrd_exit (int)
+function int thrd_detach (thrd_t)
+function int thrd_join (thrd_t, int*)
+function void thrd_yield (void)
+
+function int mtx_init (mtx_t*, int)
+function int mtx_lock (mtx_t*)
+function int mtx_timedlock (mtx_t*, const struct timespec*)
+function int mtx_trylock (mtx_t*)
+function int mtx_unlock (mtx_t*)
+function void mtx_destroy (mtx_t*)
+
+function void call_once (once_flag*, void (*)(void))
+function int cnd_init (cnd_t*)
+function int cnd_signal (cnd_t*)
+function int cnd_broadcast (cnd_t*)
+function int cnd_wait (cnd_t*, mtx_t*)
+function int cnd_timedwait (cnd_t*, mtx_t*, const struct timespec*)
+function void cnd_destroy (cnd_t*)
+
+function int tss_create (tss_t*, tss_dtor_t)
+function {void*} tss_get (tss_t)
+function int tss_set (tss_t, void*)
+function void tss_delete (tss_t)
+
+#include "time.h-data"
+
+#endif
diff --git a/include/stdc-predef.h b/include/stdc-predef.h
index a2e148c..94ed385 100644
--- a/include/stdc-predef.h
+++ b/include/stdc-predef.h
@@ -56,7 +56,4 @@ 
    see https://www.iso.org/obp/ui/#iso:std:iso-iec:10646:ed-4:v1:amd:2:v1:en) */
 #define __STDC_ISO_10646__		201605L
 
-/* We do not support C11 <threads.h>.  */
-#define __STDC_NO_THREADS__		1
-
 #endif
diff --git a/nptl/Makefile b/nptl/Makefile
index 6d48c0c..d28dbba 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -22,7 +22,7 @@  subdir	:= nptl
 
 include ../Makeconfig
 
-headers := pthread.h semaphore.h bits/semaphore.h
+headers := pthread.h semaphore.h bits/semaphore.h threads.h
 
 extra-libs := libpthread
 extra-libs-others := $(extra-libs)
@@ -138,7 +138,15 @@  libpthread-routines = nptl-init vars events version pt-interp \
 		      pthread_mutex_getprioceiling \
 		      pthread_mutex_setprioceiling \
 		      pthread_setname pthread_getname \
-		      pthread_setattr_default_np pthread_getattr_default_np
+		      pthread_setattr_default_np pthread_getattr_default_np \
+		      pthread_setattr_default_np pthread_getattr_default_np \
+		      thrd_create thrd_current thrd_detach thrd_equal \
+		      thrd_exit thrd_join thrd_sleep thrd_yield \
+		      call_once cnd_broadcast cnd_destroy cnd_init \
+		      cnd_signal cnd_timedwait cnd_wait \
+		      mtx_destroy mtx_init mtx_lock mtx_timedlock \
+		      mtx_trylock mtx_unlock \
+		      tss_create tss_delete tss_get tss_set
 #		      pthread_setuid pthread_seteuid pthread_setreuid \
 #		      pthread_setresuid \
 #		      pthread_setgid pthread_setegid pthread_setregid \
diff --git a/nptl/Versions b/nptl/Versions
index 0ae5def..6e1be0c 100644
--- a/nptl/Versions
+++ b/nptl/Versions
@@ -265,6 +265,22 @@  libpthread {
   GLIBC_2.22 {
   }
 
+  # C11 thread symbols.
+  GLIBC_2.26 {
+    thrd_create; thrd_current;
+    thrd_detach; thrd_equal;
+    thrd_exit; thrd_join;
+    thrd_sleep; thrd_yield;
+    call_once; cnd_broadcast;
+    cnd_destroy; cnd_init;
+    cnd_signal; cnd_timedwait;
+    cnd_wait; mtx_destroy;
+    mtx_init; mtx_lock;
+    mtx_timedlock; mtx_trylock;
+    mtx_unlock; tss_create;
+    tss_delete; tss_get; tss_set;
+  };
+
   GLIBC_PRIVATE {
     __pthread_initialize_minimal;
     __pthread_clock_gettime; __pthread_clock_settime;
diff --git a/nptl/call_once.c b/nptl/call_once.c
new file mode 100644
index 0000000..6af1fda
--- /dev/null
+++ b/nptl/call_once.c
@@ -0,0 +1,27 @@ 
+/* C11 threads call once implementation.
+   Copyright (C) 2017 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include "thrd_priv.h"
+
+/* Call function func exactly once, even if invoked from several
+   threads. However, all calls must be made with the same flag object.  */
+void
+call_once (once_flag *flag, void (*func)(void))
+{
+  __pthread_once (flag, func);
+}
diff --git a/nptl/cnd_broadcast.c b/nptl/cnd_broadcast.c
new file mode 100644
index 0000000..f870bd5
--- /dev/null
+++ b/nptl/cnd_broadcast.c
@@ -0,0 +1,28 @@ 
+/* C11 thread condition broadcast implementation.
+   Copyright (C) 2017 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include "thrd_priv.h"
+
+/* Unblock all threads currently waiting on condition
+   variable pointed to by cond.  */
+int
+cnd_broadcast (cnd_t *cond)
+{
+  int err_code = __pthread_cond_broadcast ((pthread_cond_t*) cond);
+  return thrd_err_map (err_code);
+}
diff --git a/nptl/cnd_destroy.c b/nptl/cnd_destroy.c
new file mode 100644
index 0000000..9ab9bb4
--- /dev/null
+++ b/nptl/cnd_destroy.c
@@ -0,0 +1,28 @@ 
+/* C11 threads condition destroy implementation.
+   Copyright (C) 2017 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include "thrd_priv.h"
+#include "pthreadP.h"
+
+/* Destroy condition variable pointed to by cond
+   and free all of its resources.  */
+void
+cnd_destroy (cnd_t *cond)
+{
+  __pthread_cond_destroy ((pthread_cond_t *) cond);
+}
diff --git a/nptl/cnd_init.c b/nptl/cnd_init.c
new file mode 100644
index 0000000..df0bb5f
--- /dev/null
+++ b/nptl/cnd_init.c
@@ -0,0 +1,27 @@ 
+/* C11 thread condition initialization implementation.
+   Copyright (C) 2017 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include "thrd_priv.h"
+
+/* Initialize new condition variable pointed by cond.  */
+int
+cnd_init (cnd_t *cond)
+{
+  int err_code = __pthread_cond_init ((pthread_cond_t *)cond, NULL);
+  return thrd_err_map (err_code);
+}
diff --git a/nptl/cnd_signal.c b/nptl/cnd_signal.c
new file mode 100644
index 0000000..cf78893
--- /dev/null
+++ b/nptl/cnd_signal.c
@@ -0,0 +1,28 @@ 
+/* C11 threads conditional signal implementation.
+   Copyright (C) 2017 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include "thrd_priv.h"
+
+/* Unblock one thread that currently waits on condition
+   variable pointed to by cond.  */
+int
+cnd_signal (cnd_t *cond)
+{
+  int err_code = __pthread_cond_signal ((pthread_cond_t *) cond);
+  return thrd_err_map (err_code);
+}
diff --git a/nptl/cnd_timedwait.c b/nptl/cnd_timedwait.c
new file mode 100644
index 0000000..7da87d1
--- /dev/null
+++ b/nptl/cnd_timedwait.c
@@ -0,0 +1,32 @@ 
+/* C11 threads condition timed wait implementation.
+   Copyright (C) 2017 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include "thrd_priv.h"
+
+/* Block current thread on the condition variable until
+   condition variable pointed on by cond is signalled
+   or time pointed by time_point is reached.  */
+int
+cnd_timedwait (cnd_t *restrict cond, mtx_t *restrict mutex,
+		const struct timespec* restrict time_point)
+{
+  int err_code = __pthread_cond_timedwait ((pthread_cond_t *) cond,
+					   (pthread_mutex_t *) mutex,
+					   time_point);
+  return thrd_err_map (err_code);
+}
diff --git a/nptl/cnd_wait.c b/nptl/cnd_wait.c
new file mode 100644
index 0000000..70924c1
--- /dev/null
+++ b/nptl/cnd_wait.c
@@ -0,0 +1,28 @@ 
+/* C11 threads condition wait implementaiton.
+   Copyright (C) 2017 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include "thrd_priv.h"
+
+/* Block current thread on the condition variable pointed to by cond.  */
+int
+cnd_wait (cnd_t *cond, mtx_t *mutex)
+{
+  int err_code = __pthread_cond_wait ((pthread_cond_t *) cond,
+				      (pthread_mutex_t *) mutex);
+  return thrd_err_map (err_code);
+}
diff --git a/nptl/descr.h b/nptl/descr.h
index a145860..c6bf99d 100644
--- a/nptl/descr.h
+++ b/nptl/descr.h
@@ -373,6 +373,7 @@  struct pthread
      to the function.  */
   void *(*start_routine) (void *);
   void *arg;
+  bool c11;
 
   /* Debug state.  */
   td_eventbuf_t eventbuf;
diff --git a/nptl/mtx_destroy.c b/nptl/mtx_destroy.c
new file mode 100644
index 0000000..1fcc534
--- /dev/null
+++ b/nptl/mtx_destroy.c
@@ -0,0 +1,27 @@ 
+/* C11 threads mutex destroy implementation.
+   Copyright (C) 2017 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include "thrd_priv.h"
+#include "pthreadP.h"
+
+/* Destroy the mutex object pointed by mutex.  */
+void
+mtx_destroy (mtx_t *mutex)
+{
+  __pthread_mutex_destroy ((pthread_mutex_t *) mutex);
+}
diff --git a/nptl/mtx_init.c b/nptl/mtx_init.c
new file mode 100644
index 0000000..cd9f77e
--- /dev/null
+++ b/nptl/mtx_init.c
@@ -0,0 +1,48 @@ 
+/* C11 threads mutex initialization implementation.
+   Copyright (C) 2017 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include "thrd_priv.h"
+
+/* Creates a new mutex object with type __type.  If successful new object
+   is pointed by __mutex.  */
+int
+mtx_init (mtx_t *mutex, int type)
+{
+  pthread_mutexattr_t attr;
+
+  __pthread_mutexattr_init (&attr);
+
+  /* Another possible solution would be to set the flags directly in
+     mutex object. */
+  switch (type)
+  {
+    case mtx_plain | mtx_recursive:
+    case mtx_timed | mtx_recursive:
+      __pthread_mutexattr_settype (&attr, PTHREAD_MUTEX_RECURSIVE);
+      break;
+    case mtx_plain:
+    case mtx_timed: /* No difference between both in standard */
+    default:
+      __pthread_mutexattr_settype (&attr, PTHREAD_MUTEX_NORMAL);
+      break;
+  }
+
+  int err_code = __pthread_mutex_init ((pthread_mutex_t *) mutex, &attr);
+  /* pthread_mutexattr_destroy implementation is empty.  */
+  return thrd_err_map (err_code);
+}
diff --git a/nptl/mtx_lock.c b/nptl/mtx_lock.c
new file mode 100644
index 0000000..3a20f41
--- /dev/null
+++ b/nptl/mtx_lock.c
@@ -0,0 +1,29 @@ 
+/* C11 threads mutex lock implementation.
+   Copyright (C) 2017 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include "thrd_priv.h"
+
+/* Block the current thread until the mutex pointed to by __mutex is
+   unlocked. In case the mutex is free, the current thread will not
+   be blocked.  */
+int
+mtx_lock (mtx_t *mutex)
+{
+  int err_code = __pthread_mutex_lock ((pthread_mutex_t *) mutex);
+  return thrd_err_map (err_code);
+}
diff --git a/nptl/mtx_timedlock.c b/nptl/mtx_timedlock.c
new file mode 100644
index 0000000..9834162
--- /dev/null
+++ b/nptl/mtx_timedlock.c
@@ -0,0 +1,31 @@ 
+/* C11 threads mutex timed lock implementation.
+   Copyright (C) 2017 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include "thrd_priv.h"
+
+/* Block the current thread until the mutex pointed to  by mutex is unlocked
+   or time pointed by time_point is reached. In case the mutex is free, the
+   current thread will not be blocked.  */
+int
+mtx_timedlock (mtx_t *restrict mutex,
+	       const struct timespec *restrict time_point)
+{
+  int err_code = __pthread_mutex_timedlock ((pthread_mutex_t *)mutex,
+					    time_point);
+  return thrd_err_map (err_code);
+}
diff --git a/nptl/mtx_trylock.c b/nptl/mtx_trylock.c
new file mode 100644
index 0000000..75d09c1
--- /dev/null
+++ b/nptl/mtx_trylock.c
@@ -0,0 +1,29 @@ 
+/* C11 threads mutex try lock implementation.
+   Copyright (C) 2017 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include "thrd_priv.h"
+
+/* Try to lock the mutex pointed by mutex without blocking.
+   If the mutex is free, current threads takes control of it, and
+   if it's not, returns immediately.  */
+int
+mtx_trylock (mtx_t *mutex)
+{
+  int err_code = __pthread_mutex_trylock ((pthread_mutex_t *) mutex);
+  return thrd_err_map (err_code);
+}
diff --git a/nptl/mtx_unlock.c b/nptl/mtx_unlock.c
new file mode 100644
index 0000000..33f5ddb
--- /dev/null
+++ b/nptl/mtx_unlock.c
@@ -0,0 +1,28 @@ 
+/* C11 threads mutex unlock implementation.
+   Copyright (C) 2017 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include "thrd_priv.h"
+
+/* Unlock the mutex pointed to by mutex, what can lead to
+   awaking other threads waiting on this mutex.  */
+int
+mtx_unlock (mtx_t *mutex)
+{
+  int err_code = __pthread_mutex_unlock ((pthread_mutex_t *) mutex);
+  return thrd_err_map (err_code);
+}
diff --git a/nptl/pthreadP.h b/nptl/pthreadP.h
index c4f8879..6369776 100644
--- a/nptl/pthreadP.h
+++ b/nptl/pthreadP.h
@@ -173,6 +173,9 @@  enum
 #define __PTHREAD_ONCE_DONE		2
 #define __PTHREAD_ONCE_FORK_GEN_INCR	4
 
+/* Attribute to indicate thread creation was issued from C11 thrd_create.  */
+#define ATTR_C11_THREAD ((void*)(uintptr_t)-1)
+
 
 /* Condition variable definitions.  See __pthread_cond_wait_common.
    Need to be defined here so there is one place from which
diff --git a/nptl/pthread_create.c b/nptl/pthread_create.c
index b303557..d76347f 100644
--- a/nptl/pthread_create.c
+++ b/nptl/pthread_create.c
@@ -452,11 +452,24 @@  START_THREAD_DEFN
       LIBC_PROBE (pthread_start, 3, (pthread_t) pd, pd->start_routine, pd->arg);
 
       /* Run the code the user provided.  */
+      void *ret;
 #ifdef CALL_THREAD_FCT
-      THREAD_SETMEM (pd, result, CALL_THREAD_FCT (pd));
+      ret = CALL_THREAD_FCT (pd, pd->c11);
 #else
-      THREAD_SETMEM (pd, result, pd->start_routine (pd->arg));
+      if (pd->c11)
+	{
+	  /* The function pointer for the the c11 thread start is cast to
+	     an incorrect type on __pthread_create_2_1 call, however it is
+	     casted back to correct one so the call behavior is
+	     well-defined (it is assumed that pointers to void are able to
+	     represent all values of int.  */
+	  int (*start)(void*) = (int (*) (void*)) pd->start_routine;
+	  ret = (void*) (intptr_t) start (pd->arg);
+	}
+      else
+	ret = pd->start_routine (pd->arg);
 #endif
+      THREAD_SETMEM (pd, result, ret);
     }
 
   /* Call destructors for the thread_local TLS variables.  */
@@ -632,7 +645,8 @@  __pthread_create_2_1 (pthread_t *newthread, const pthread_attr_t *attr,
   const struct pthread_attr *iattr = (struct pthread_attr *) attr;
   struct pthread_attr default_attr;
   bool free_cpuset = false;
-  if (iattr == NULL)
+  bool c11 = (attr == ATTR_C11_THREAD);
+  if (iattr == NULL || c11)
     {
       lll_lock (__default_pthread_attr_lock, LLL_PRIVATE);
       default_attr = __default_pthread_attr;
@@ -690,6 +704,7 @@  __pthread_create_2_1 (pthread_t *newthread, const pthread_attr_t *attr,
      get the information from its thread descriptor.  */
   pd->start_routine = start_routine;
   pd->arg = arg;
+  pd->c11 = c11;
 
   /* Copy the thread attribute flags.  */
   struct pthread *self = THREAD_SELF;
diff --git a/nptl/thrd_create.c b/nptl/thrd_create.c
new file mode 100644
index 0000000..5443d67
--- /dev/null
+++ b/nptl/thrd_create.c
@@ -0,0 +1,30 @@ 
+/* C11 threads thread creation implementation.
+   Copyright (C) 2017 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include "thrd_priv.h"
+
+/* Create a new thread executing the function __func. Arguments to __func
+   are passed through __arg. If succesful, __thr is set to new
+   thread identifier.  */
+int
+thrd_create (thrd_t *thr, thrd_start_t func, void *arg)
+{
+  int err_code = __pthread_create_2_1 (thr, ATTR_C11_THREAD, 
+				       (void* (*) (void*))func, arg);
+  return thrd_err_map (err_code);
+}
diff --git a/nptl/thrd_current.c b/nptl/thrd_current.c
new file mode 100644
index 0000000..7269d4b
--- /dev/null
+++ b/nptl/thrd_current.c
@@ -0,0 +1,26 @@ 
+/* C11 threads current thread implementation.
+   Copyright (C) 2017 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include "thrd_priv.h"
+
+/* Return current thread identifier.  */
+thrd_t
+thrd_current (void)
+{
+  return __pthread_self ();
+}
diff --git a/nptl/thrd_detach.c b/nptl/thrd_detach.c
new file mode 100644
index 0000000..07f0707
--- /dev/null
+++ b/nptl/thrd_detach.c
@@ -0,0 +1,30 @@ 
+/* C11 threads thread detach implementation.
+   Copyright (C) 2017 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include "thrd_priv.h"
+
+/* Detache the thread identified by __thr from the current environment.
+   That means we cannot join or wait for __thr to finish it's execution.  */
+int
+thrd_detach (thrd_t thr)
+{
+  int err_code;
+
+  err_code = __pthread_detach (thr);
+  return thrd_err_map (err_code);
+}
diff --git a/nptl/thrd_equal.c b/nptl/thrd_equal.c
new file mode 100644
index 0000000..fcda488
--- /dev/null
+++ b/nptl/thrd_equal.c
@@ -0,0 +1,26 @@ 
+/* C11 threads thread equality check implementation.
+   Copyright (C) 2017 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include "thrd_priv.h"
+
+/* Check if lhs and rhs point to the same thread.  */
+int
+thrd_equal (thrd_t lhs, thrd_t rhs)
+{
+  return __pthread_equal (lhs, rhs);
+}
diff --git a/nptl/thrd_exit.c b/nptl/thrd_exit.c
new file mode 100644
index 0000000..e3399b0
--- /dev/null
+++ b/nptl/thrd_exit.c
@@ -0,0 +1,27 @@ 
+/* C11 threads thread exit implementation.
+   Copyright (C) 2017 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include "thrd_priv.h"
+
+/* Terminate current thread execution, cleaning up any thread local
+   storage and freeing resources. Returns the value specified in __res.  */
+_Noreturn void
+thrd_exit (int res)
+{
+  __pthread_exit ((void*)(uintptr_t) res);
+}
diff --git a/nptl/thrd_join.c b/nptl/thrd_join.c
new file mode 100644
index 0000000..65c68ff
--- /dev/null
+++ b/nptl/thrd_join.c
@@ -0,0 +1,32 @@ 
+/* C11 threads thread join implementation.
+   Copyright (C) 2017 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include "thrd_priv.h"
+
+/* Block current thread until execution of __thr is complete.  In case that
+   __res is not NULL, will store the return value of __thr when exiting.  */
+int
+thrd_join (thrd_t thr, int *res)
+{
+  void *pthread_res;
+  int err_code = __pthread_join (thr, &pthread_res);
+  if (res)
+   *res = (int)((uintptr_t)pthread_res);
+
+  return thrd_err_map (err_code);
+}
diff --git a/nptl/thrd_priv.h b/nptl/thrd_priv.h
new file mode 100644
index 0000000..a431d60
--- /dev/null
+++ b/nptl/thrd_priv.h
@@ -0,0 +1,46 @@ 
+/* Internal C11 threads definitions.
+   Copyright (C) 2017 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#ifndef THRD_PRIV_H
+# define THRD_PRIV_H
+
+#include <features.h>
+#include <threads.h>
+#include <errno.h>
+#include "pthreadP.h"	/* For pthread_{mutex,cond}_t definitions.  */
+
+/* Maps pthread error codes with thrd error codes.  */
+static __always_inline int
+thrd_err_map (int err_code)
+{
+  switch (err_code)
+  {
+    case 0:
+      return thrd_success;
+    case ENOMEM:
+      return thrd_nomem;
+    case ETIMEDOUT:
+      return thrd_timedout;
+    case EBUSY:
+      return thrd_busy;
+    default:
+      return thrd_error;
+  }
+}
+
+#endif
diff --git a/nptl/thrd_sleep.c b/nptl/thrd_sleep.c
new file mode 100644
index 0000000..185e212
--- /dev/null
+++ b/nptl/thrd_sleep.c
@@ -0,0 +1,41 @@ 
+/* C11 threads thread sleep implementation.
+   Copyright (C) 2017 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include "thrd_priv.h"
+#include <time.h>
+
+/* Block current thread execution for at least the time pointed by
+   __time_point.  The current thread may resume if receives a signal.  In
+   that case, if __remaining is not NULL, the remaining time is stored in
+   the object pointed by __remaining.  */
+int
+thrd_sleep (const struct timespec* time_point, struct timespec* remaining)
+{
+  INTERNAL_SYSCALL_DECL (err);
+  int ret = INTERNAL_SYSCALL_CALL (nanosleep, err, time_point, remaining);
+  if (INTERNAL_SYSCALL_ERROR_P (ret, err))
+    {
+      /* C11 states thrd_sleep function returns -1 if it has been interrupted
+         by a signal, or a negative value if it fails.  */
+      ret = INTERNAL_SYSCALL_ERRNO (ret, err);
+      if (ret == EINTR)
+	return -1;
+      return -2;
+    }
+  return 0;
+}
diff --git a/nptl/thrd_yield.c b/nptl/thrd_yield.c
new file mode 100644
index 0000000..13a02f3
--- /dev/null
+++ b/nptl/thrd_yield.c
@@ -0,0 +1,29 @@ 
+/* C11 threads thread yield implementation.
+   Copyright (C) 2017 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include "thrd_priv.h"
+
+/* Stop current thread execution and call the scheduler to decide which
+   thread should execute next.  The current thread may be selected by the
+   scheduler to keep running.  */
+void
+thrd_yield (void)
+{
+  INTERNAL_SYSCALL_DECL (err);
+  INTERNAL_SYSCALL_CALL (sched_yield, err);
+}
diff --git a/nptl/tss_create.c b/nptl/tss_create.c
new file mode 100644
index 0000000..5aa6704
--- /dev/null
+++ b/nptl/tss_create.c
@@ -0,0 +1,29 @@ 
+/* C11 threads thread-specific creation implementation.
+   Copyright (C) 2017 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include "thrd_priv.h"
+
+/* Create new thread-specific storage key and stores it in the object
+   pointed by tss_id. If destructor is not NULL, destructor function is
+   called when the thread terminates.  */
+int
+tss_create (tss_t *tss_id, tss_dtor_t destructor)
+{
+  int err_code = __pthread_key_create (tss_id, destructor);
+  return thrd_err_map (err_code);
+}
diff --git a/nptl/tss_delete.c b/nptl/tss_delete.c
new file mode 100644
index 0000000..a57acd3
--- /dev/null
+++ b/nptl/tss_delete.c
@@ -0,0 +1,27 @@ 
+/* C11 threads thread-specific delete implementation.
+   Copyright (C) 2017 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include "thrd_priv.h"
+
+/* Destroys the thread-specific storage identified by tss_id. However,
+   the destructor is not called until thrd_exit is called. */
+void
+tss_delete (tss_t tss_id)
+{
+  __pthread_key_delete (tss_id);
+}
diff --git a/nptl/tss_get.c b/nptl/tss_get.c
new file mode 100644
index 0000000..784a1cf
--- /dev/null
+++ b/nptl/tss_get.c
@@ -0,0 +1,27 @@ 
+/* C11 threads thread-specific get implementation.
+   Copyright (C) 2017 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include "thrd_priv.h"
+
+/* Return the value held in thread-specific storage for the current
+   thread identified by tss_id.  */
+void *
+tss_get (tss_t tss_id)
+{
+  return __pthread_getspecific (tss_id);
+}
diff --git a/nptl/tss_set.c b/nptl/tss_set.c
new file mode 100644
index 0000000..16a0b04
--- /dev/null
+++ b/nptl/tss_set.c
@@ -0,0 +1,28 @@ 
+/* C11 threads thread-specific set implementation.
+   Copyright (C) 2017 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include "thrd_priv.h"
+
+/* Sets the value of the thread-specific storage identified by tss_id for
+   the current thread to val.  */
+int
+tss_set (tss_t tss_id, void *val)
+{
+  int err_code = __pthread_setspecific (tss_id, val);
+  return thrd_err_map (err_code);
+}
diff --git a/sysdeps/aarch64/nptl/bits/thread-shared-types.h b/sysdeps/aarch64/nptl/bits/thread-shared-types.h
index bb361d7..d82a9b7 100644
--- a/sysdeps/aarch64/nptl/bits/thread-shared-types.h
+++ b/sysdeps/aarch64/nptl/bits/thread-shared-types.h
@@ -91,4 +91,7 @@  struct __pthread_mutex_s
   char __size[__SIZEOF_PTHREAD_COND_T];				\
   __extension__ long long int __align;
 
+/* Used to force once_flag alignment.  */
+#define __ONCE_FLAG_ALIGN
+
 #endif
diff --git a/sysdeps/alpha/nptl/bits/thread-shared-types.h b/sysdeps/alpha/nptl/bits/thread-shared-types.h
index b3c8505..ce7b791 100644
--- a/sysdeps/alpha/nptl/bits/thread-shared-types.h
+++ b/sysdeps/alpha/nptl/bits/thread-shared-types.h
@@ -87,4 +87,7 @@  struct __pthread_mutex_s
   char __size[__SIZEOF_PTHREAD_COND_T];			\
   __extension__ long long int __align;
 
+/* Used to force once_flag alignment.  */
+#define __ONCE_FLAG_ALIGN
+
 #endif
diff --git a/sysdeps/arm/nptl/bits/thread-shared-types.h b/sysdeps/arm/nptl/bits/thread-shared-types.h
index 2475792..1fac0fd 100644
--- a/sysdeps/arm/nptl/bits/thread-shared-types.h
+++ b/sysdeps/arm/nptl/bits/thread-shared-types.h
@@ -89,4 +89,7 @@  struct __pthread_mutex_s
   char __size[__SIZEOF_PTHREAD_COND_T];			\
   __extension__ long long int __align;
 
+/* Used to force once_flag alignment.  */
+#define __ONCE_FLAG_ALIGN
+
 #endif
diff --git a/sysdeps/hppa/nptl/bits/thread-shared-types.h b/sysdeps/hppa/nptl/bits/thread-shared-types.h
index 2a6d7d9..d46861b 100644
--- a/sysdeps/hppa/nptl/bits/thread-shared-types.h
+++ b/sysdeps/hppa/nptl/bits/thread-shared-types.h
@@ -99,4 +99,7 @@  struct __pthread_mutex_s
   char __size[__SIZEOF_PTHREAD_COND_T];   \
   __extension__ long long int __align;
 
+/* Used to force once_flag alignment.  */
+#define __ONCE_FLAG_ALIGN
+
 #endif
diff --git a/sysdeps/i386/nptl/tls.h b/sysdeps/i386/nptl/tls.h
index 04dc6ae..402aac0 100644
--- a/sysdeps/i386/nptl/tls.h
+++ b/sysdeps/i386/nptl/tls.h
@@ -395,7 +395,7 @@  tls_fill_user_desc (union user_desc_init *desc,
 
 
 /* Call the user-provided thread function.  */
-#define CALL_THREAD_FCT(descr) \
+#define CALL_THREAD_FCT(descr, c11) \
   ({ void *__res;							      \
      int __ignore1, __ignore2;						      \
      asm volatile ("pushl %%eax\n\t"					      \
diff --git a/sysdeps/ia64/nptl/bits/thread-shared-types.h b/sysdeps/ia64/nptl/bits/thread-shared-types.h
index f318236..652ea57 100644
--- a/sysdeps/ia64/nptl/bits/thread-shared-types.h
+++ b/sysdeps/ia64/nptl/bits/thread-shared-types.h
@@ -89,4 +89,7 @@  struct __pthread_mutex_s
   __extension__ long long int __align;
 
 
+/* Used to force once_flag alignment.  */
+#define __ONCE_FLAG_ALIGN
+
 #endif
diff --git a/sysdeps/m68k/nptl/bits/thread-shared-types.h b/sysdeps/m68k/nptl/bits/thread-shared-types.h
index ab6f05f..b539ed35 100644
--- a/sysdeps/m68k/nptl/bits/thread-shared-types.h
+++ b/sysdeps/m68k/nptl/bits/thread-shared-types.h
@@ -94,4 +94,7 @@  struct __pthread_mutex_s
   __extension__ long long int __align;
 
 
+/* Used to force once_flag alignment.  */
+#define __ONCE_FLAG_ALIGN __attribute__ ((__aligned__ (4)))
+
 #endif
diff --git a/sysdeps/microblaze/nptl/bits/thread-shared-types.h b/sysdeps/microblaze/nptl/bits/thread-shared-types.h
index 91d14b6..fccdf83 100644
--- a/sysdeps/microblaze/nptl/bits/thread-shared-types.h
+++ b/sysdeps/microblaze/nptl/bits/thread-shared-types.h
@@ -90,4 +90,7 @@  struct __pthread_mutex_s
   char __size[__SIZEOF_PTHREAD_COND_T];			\
   __extension__ long long int __align;
 
+/* Used to force once_flag alignment.  */
+#define __ONCE_FLAG_ALIGN
+
 #endif
diff --git a/sysdeps/mips/nptl/bits/thread-shared-types.h b/sysdeps/mips/nptl/bits/thread-shared-types.h
index a34b816..c0c69fa 100644
--- a/sysdeps/mips/nptl/bits/thread-shared-types.h
+++ b/sysdeps/mips/nptl/bits/thread-shared-types.h
@@ -111,4 +111,7 @@  struct __pthread_mutex_s
   char __size[__SIZEOF_PTHREAD_COND_T];			\
   __extension__ long long int __align;
 
+/* Used to force once_flag alignment.  */
+#define __ONCE_FLAG_ALIGN
+
 #endif
diff --git a/sysdeps/nacl/libpthread.abilist b/sysdeps/nacl/libpthread.abilist
index 8f0099c..7d377b5 100644
--- a/sysdeps/nacl/libpthread.abilist
+++ b/sysdeps/nacl/libpthread.abilist
@@ -173,3 +173,29 @@  GLIBC_2.22 sem_timedwait F
 GLIBC_2.22 sem_trywait F
 GLIBC_2.22 sem_unlink F
 GLIBC_2.22 sem_wait F
+GLIBC_2.26 GLIBC_2.26 A
+GLIBC_2.26 call_once F
+GLIBC_2.26 cnd_broadcast F
+GLIBC_2.26 cnd_destroy F
+GLIBC_2.26 cnd_init F
+GLIBC_2.26 cnd_signal F
+GLIBC_2.26 cnd_timedwait F
+GLIBC_2.26 cnd_wait F
+GLIBC_2.26 mtx_destroy F
+GLIBC_2.26 mtx_init F
+GLIBC_2.26 mtx_lock F
+GLIBC_2.26 mtx_timedlock F
+GLIBC_2.26 mtx_trylock F
+GLIBC_2.26 mtx_unlock F
+GLIBC_2.26 thrd_create F
+GLIBC_2.26 thrd_current F
+GLIBC_2.26 thrd_detach F
+GLIBC_2.26 thrd_equal F
+GLIBC_2.26 thrd_exit F
+GLIBC_2.26 thrd_join F
+GLIBC_2.26 thrd_sleep F
+GLIBC_2.26 thrd_yield F
+GLIBC_2.26 tss_create F
+GLIBC_2.26 tss_delete F
+GLIBC_2.26 tss_get F
+GLIBC_2.26 tss_set F
diff --git a/sysdeps/nios2/nptl/bits/thread-shared-types.h b/sysdeps/nios2/nptl/bits/thread-shared-types.h
index 8904239..bf58a90 100644
--- a/sysdeps/nios2/nptl/bits/thread-shared-types.h
+++ b/sysdeps/nios2/nptl/bits/thread-shared-types.h
@@ -87,4 +87,7 @@  struct __pthread_mutex_s
   char __size[__SIZEOF_PTHREAD_COND_T];			\
   __extension__ long long int __align;
 
+/* Used to force once_flag alignment.  */
+#define __ONCE_FLAG_ALIGN
+
 #endif
diff --git a/sysdeps/nptl/threads.h b/sysdeps/nptl/threads.h
new file mode 100644
index 0000000..7d7282a
--- /dev/null
+++ b/sysdeps/nptl/threads.h
@@ -0,0 +1,198 @@ 
+/* ISO C11 Standard: 7.26 - Thread support library  <threads.h>.
+   Copyright (C) 2017 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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#ifndef _THREADS_H
+#define _THREADS_H	1
+
+#include <features.h>
+#include <time.h>
+
+__BEGIN_DECLS
+
+#include <bits/thread-shared-types.h>
+#include <bits/types/struct_timespec.h>
+
+#define ONCE_FLAG_INIT 0
+#define thread_local _Thread_local
+#define TSS_DTOR_ITERATIONS 4
+
+typedef unsigned long int thrd_t;         /* Based on pthread_t.  */
+typedef int __ONCE_FLAG_ALIGN once_flag;  /* Based on pthread_once_t.  */
+typedef unsigned int tss_t;               /* Based on pthread_key_t.  */
+typedef int (*thrd_start_t) (void*);
+typedef void (*tss_dtor_t) (void*);
+
+/* Exit and error codes.  */
+enum
+{
+  thrd_success  = 0,
+  thrd_busy     = 1,
+  thrd_error    = 2,
+  thrd_nomem    = 3,
+  thrd_timedout = 4
+};
+
+/* Kinds of mutexes.  */
+enum
+{
+  mtx_plain     = 0,
+  mtx_recursive = 1,
+  mtx_timed     = 2
+};
+
+/* Definition of mtx_t based on pthread_mutex_t.  */
+typedef union
+{
+  __PTHREAD_MUTEX_T_CONTENT
+} mtx_t;
+
+/* Definition of cnd_t based on pthread_cond_t.  */
+typedef union
+{
+  __PTHREAD_COND_T_CONTENT
+} cnd_t;
+
+/* Threads functions.  */
+
+/* Create a new thread executing the function __func. Arguments to __func
+   are passed through __arg. If succesful, __thr is set to new
+   thread identifier.  */
+extern int thrd_create (thrd_t *__thr, thrd_start_t __func, void *__arg);
+
+/* Check if __lhs and __rhs point to the same thread.  */
+extern int thrd_equal (thrd_t __lhs, thrd_t __rhs);
+
+/* Return current thread identifier.  */
+extern thrd_t thrd_current (void);
+
+/* Block current thread execution for at least the time pointed by
+   __time_point.  The current thread may resume if receives a signal.  In
+   that case, if __remaining is not NULL, the remaining time is stored in
+   the object pointed by __remaining.  */
+extern int thrd_sleep (const struct timespec *__time_point,
+		       struct timespec *__remaining);
+
+/* Terminate current thread execution, cleaning up any thread local
+   storage and freeing resources. Returns the value specified in __res.  */
+extern void thrd_exit (int __res) __attribute__ ((__noreturn__));
+
+/* Detache the thread identified by __thr from the current environment.
+   That means we cannot join or wait for __thr to finish it's execution.  */
+extern int thrd_detach (thrd_t __thr);
+
+/* Block current thread until execution of __thr is complete.  In case that
+   __res is not NULL, will store the return value of __thr when exiting.  */
+extern int thrd_join (thrd_t __thr, int *__res);
+
+/* Stop current thread execution and call the scheduler to decide which
+   thread should execute next.  The current thread may be selected by the
+   scheduler to keep running.  */
+extern void thrd_yield (void);
+
+/* Mutex functions.  */
+
+/* Creates a new mutex object with type __type.  If successful the new
+   object is pointed by __mutex.  */
+extern int mtx_init (mtx_t *__mutex, int __type);
+
+/* Block the current thread until the mutex pointed to
+   by __mutex is unlocked. In case the mutex is free,
+   the current thread will not be blocked.  */
+extern int mtx_lock (mtx_t *__mutex);
+
+/* Block the current thread until the mutex pointed by __mutex is unlocked
+   or time pointed by __time_point is reached.  In case the mutex is free,
+   the current thread will not be blocked.  */
+extern int mtx_timedlock (mtx_t *__restrict __mutex,
+			  const struct timespec *__restrict __time_point);
+
+/* Try to lock the mutex pointed by __mutex without blocking.  If the mutex
+   is free, current threads takes control of it, and if it's not, returns
+   immediately.  */
+extern int mtx_trylock (mtx_t *__mutex);
+
+/* Unlock the mutex pointed to by __mutex, what can lead to
+   awaking other threads waiting on this mutex.  */
+extern int mtx_unlock (mtx_t *__mutex);
+
+/* Destroy the mutex object pointed by __mutex.  */
+extern void mtx_destroy (mtx_t *__mutex);
+
+/* Call function __func exactly once, even if invoked from several threads.
+   However, all calls must be made with the same __flag object.  */
+extern void call_once (once_flag *__flag, void (*__func)(void));
+
+/* Condition variable functions.  */
+
+/* Initialize new condition variable pointed by __cond.  */
+extern int cnd_init (cnd_t *__cond);
+
+/* Unblock one thread that currently waits on condition variable pointed to
+   by __cond.  */
+extern int cnd_signal (cnd_t *__cond);
+
+/* Unblock all threads currently waiting on condition variable pointed to by
+   __cond.  */
+extern int cnd_broadcast (cnd_t *__cond);
+
+/* Block current thread on the condition variable
+   pointed to by __cond.  */
+extern int cnd_wait (cnd_t *__cond, mtx_t *__mutex);
+
+/* Block current thread on the condition variable until condition variable
+   pointed on by __cond is signalled or time pointed by __time_point is
+   reached.  */
+extern int cnd_timedwait (cnd_t *__restrict __cond,
+			  mtx_t *__restrict __mutex,
+			  const struct timespec *__restrict __time_point);
+
+/* Destroy condition variable pointed to by __cond and free all of its
+   resources.  */
+extern void cnd_destroy (cnd_t *__cond);
+
+/* Thread specific storage functions.  */
+
+/* Create new thread-specific storage key and stores it in the object pointed
+   by __tss_id.  If __destructor is not NULL, __destructor function is called
+   when the thread terminates.  */
+extern int tss_create (tss_t *__tss_id, tss_dtor_t __destructor);
+
+/* Return the value held in thread-specific storage for the current thread
+   identified by __tss_id.  */
+extern void *tss_get (tss_t __tss_id);
+
+/* Sets the value of the thread-specific storage identified by __tss_id for
+   the current thread to __val.  */
+extern int tss_set (tss_t __tss_id, void *__val);
+
+/* Destroys the thread-specific storage identified by __tss_id.  However, the
+   destructor is not called until thrd_exit is called.  */
+extern void tss_delete (tss_t __tss_id);
+
+#ifdef __USE_EXTERN_INLINES
+/* Optimizations.  */
+__extern_inline int
+thrd_equal (thrd_t __thread1, thrd_t __thread2)
+{
+  return __thread1 == __thread2;
+}
+#endif
+
+__END_DECLS
+
+#endif /* _THREADS_H */
diff --git a/sysdeps/powerpc/nptl/bits/thread-shared-types.h b/sysdeps/powerpc/nptl/bits/thread-shared-types.h
index 3653f83..6ca60ba 100644
--- a/sysdeps/powerpc/nptl/bits/thread-shared-types.h
+++ b/sysdeps/powerpc/nptl/bits/thread-shared-types.h
@@ -115,4 +115,7 @@  struct __pthread_mutex_s
   char __size[__SIZEOF_PTHREAD_COND_T];			\
   __extension__ long long int __align;
 
+/* Used to force once_flag alignment.  */
+#define __ONCE_FLAG_ALIGN
+
 #endif
diff --git a/sysdeps/s390/nptl/bits/thread-shared-types.h b/sysdeps/s390/nptl/bits/thread-shared-types.h
index 893e626..bedcd28 100644
--- a/sysdeps/s390/nptl/bits/thread-shared-types.h
+++ b/sysdeps/s390/nptl/bits/thread-shared-types.h
@@ -134,4 +134,7 @@  struct __pthread_mutex_s
   char __size[__SIZEOF_PTHREAD_COND_T];			\
   __extension__ long long int __align;
 
+/* Used to force once_flag alignment.  */
+#define __ONCE_FLAG_ALIGN
+
 #endif
diff --git a/sysdeps/sh/nptl/bits/thread-shared-types.h b/sysdeps/sh/nptl/bits/thread-shared-types.h
index 7a28e58..1f90b3b 100644
--- a/sysdeps/sh/nptl/bits/thread-shared-types.h
+++ b/sysdeps/sh/nptl/bits/thread-shared-types.h
@@ -91,4 +91,8 @@  struct __pthread_mutex_s
   char __size[__SIZEOF_PTHREAD_COND_T];			\
   __extension__ long long int __align;
 
+
+/* Used to force once_flag alignment.  */
+#define __ONCE_FLAG_ALIGN
+
 #endif	/* bits/thread-shared-types.h */
diff --git a/sysdeps/sparc/nptl/bits/thread-shared-types.h b/sysdeps/sparc/nptl/bits/thread-shared-types.h
index d12916a..e44ec45 100644
--- a/sysdeps/sparc/nptl/bits/thread-shared-types.h
+++ b/sysdeps/sparc/nptl/bits/thread-shared-types.h
@@ -111,5 +111,9 @@  struct __pthread_mutex_s
   char __size[__SIZEOF_PTHREAD_COND_T];			\
   __extension__ long long int __align;
 
+
+/* Used to force once_flag alignment.  */
+#define __ONCE_FLAG_ALIGN
+
 #endif
 
diff --git a/sysdeps/tile/nptl/bits/thread-shared-types.h b/sysdeps/tile/nptl/bits/thread-shared-types.h
index 0a4587e..88d3b8a 100644
--- a/sysdeps/tile/nptl/bits/thread-shared-types.h
+++ b/sysdeps/tile/nptl/bits/thread-shared-types.h
@@ -111,4 +111,8 @@  struct __pthread_mutex_s
   char __size[__SIZEOF_PTHREAD_COND_T];			\
   __extension__ long long int __align;
 
+
+/* Used to force once_flag alignment.  */
+#define __ONCE_FLAG_ALIGN
+
 #endif
diff --git a/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist b/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist
index 0cf30ee..c0f6af2 100644
--- a/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist
@@ -224,3 +224,29 @@  GLIBC_2.17 write F
 GLIBC_2.18 GLIBC_2.18 A
 GLIBC_2.18 pthread_getattr_default_np F
 GLIBC_2.18 pthread_setattr_default_np F
+GLIBC_2.26 GLIBC_2.26 A
+GLIBC_2.26 call_once F
+GLIBC_2.26 cnd_broadcast F
+GLIBC_2.26 cnd_destroy F
+GLIBC_2.26 cnd_init F
+GLIBC_2.26 cnd_signal F
+GLIBC_2.26 cnd_timedwait F
+GLIBC_2.26 cnd_wait F
+GLIBC_2.26 mtx_destroy F
+GLIBC_2.26 mtx_init F
+GLIBC_2.26 mtx_lock F
+GLIBC_2.26 mtx_timedlock F
+GLIBC_2.26 mtx_trylock F
+GLIBC_2.26 mtx_unlock F
+GLIBC_2.26 thrd_create F
+GLIBC_2.26 thrd_current F
+GLIBC_2.26 thrd_detach F
+GLIBC_2.26 thrd_equal F
+GLIBC_2.26 thrd_exit F
+GLIBC_2.26 thrd_join F
+GLIBC_2.26 thrd_sleep F
+GLIBC_2.26 thrd_yield F
+GLIBC_2.26 tss_create F
+GLIBC_2.26 tss_delete F
+GLIBC_2.26 tss_get F
+GLIBC_2.26 tss_set F
diff --git a/sysdeps/unix/sysv/linux/alpha/libpthread.abilist b/sysdeps/unix/sysv/linux/alpha/libpthread.abilist
index 7e121d4..bf852a0 100644
--- a/sysdeps/unix/sysv/linux/alpha/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/alpha/libpthread.abilist
@@ -216,6 +216,32 @@  GLIBC_2.2.3 GLIBC_2.2.3 A
 GLIBC_2.2.3 pthread_getattr_np F
 GLIBC_2.2.6 GLIBC_2.2.6 A
 GLIBC_2.2.6 __nanosleep F
+GLIBC_2.26 GLIBC_2.26 A
+GLIBC_2.26 call_once F
+GLIBC_2.26 cnd_broadcast F
+GLIBC_2.26 cnd_destroy F
+GLIBC_2.26 cnd_init F
+GLIBC_2.26 cnd_signal F
+GLIBC_2.26 cnd_timedwait F
+GLIBC_2.26 cnd_wait F
+GLIBC_2.26 mtx_destroy F
+GLIBC_2.26 mtx_init F
+GLIBC_2.26 mtx_lock F
+GLIBC_2.26 mtx_timedlock F
+GLIBC_2.26 mtx_trylock F
+GLIBC_2.26 mtx_unlock F
+GLIBC_2.26 thrd_create F
+GLIBC_2.26 thrd_current F
+GLIBC_2.26 thrd_detach F
+GLIBC_2.26 thrd_equal F
+GLIBC_2.26 thrd_exit F
+GLIBC_2.26 thrd_join F
+GLIBC_2.26 thrd_sleep F
+GLIBC_2.26 thrd_yield F
+GLIBC_2.26 tss_create F
+GLIBC_2.26 tss_delete F
+GLIBC_2.26 tss_get F
+GLIBC_2.26 tss_set F
 GLIBC_2.3.2 GLIBC_2.3.2 A
 GLIBC_2.3.2 pthread_cond_broadcast F
 GLIBC_2.3.2 pthread_cond_destroy F
diff --git a/sysdeps/unix/sysv/linux/arm/libpthread.abilist b/sysdeps/unix/sysv/linux/arm/libpthread.abilist
index 91545c1..7c39603 100644
--- a/sysdeps/unix/sysv/linux/arm/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/arm/libpthread.abilist
@@ -9,6 +9,32 @@  GLIBC_2.12 pthread_setname_np F
 GLIBC_2.18 GLIBC_2.18 A
 GLIBC_2.18 pthread_getattr_default_np F
 GLIBC_2.18 pthread_setattr_default_np F
+GLIBC_2.26 GLIBC_2.26 A
+GLIBC_2.26 call_once F
+GLIBC_2.26 cnd_broadcast F
+GLIBC_2.26 cnd_destroy F
+GLIBC_2.26 cnd_init F
+GLIBC_2.26 cnd_signal F
+GLIBC_2.26 cnd_timedwait F
+GLIBC_2.26 cnd_wait F
+GLIBC_2.26 mtx_destroy F
+GLIBC_2.26 mtx_init F
+GLIBC_2.26 mtx_lock F
+GLIBC_2.26 mtx_timedlock F
+GLIBC_2.26 mtx_trylock F
+GLIBC_2.26 mtx_unlock F
+GLIBC_2.26 thrd_create F
+GLIBC_2.26 thrd_current F
+GLIBC_2.26 thrd_detach F
+GLIBC_2.26 thrd_equal F
+GLIBC_2.26 thrd_exit F
+GLIBC_2.26 thrd_join F
+GLIBC_2.26 thrd_sleep F
+GLIBC_2.26 thrd_yield F
+GLIBC_2.26 tss_create F
+GLIBC_2.26 tss_delete F
+GLIBC_2.26 tss_get F
+GLIBC_2.26 tss_set F
 GLIBC_2.4 GLIBC_2.4 A
 GLIBC_2.4 _IO_flockfile F
 GLIBC_2.4 _IO_ftrylockfile F
diff --git a/sysdeps/unix/sysv/linux/hppa/libpthread.abilist b/sysdeps/unix/sysv/linux/hppa/libpthread.abilist
index a73aa43..4d1dbc5 100644
--- a/sysdeps/unix/sysv/linux/hppa/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/hppa/libpthread.abilist
@@ -204,6 +204,32 @@  GLIBC_2.2.3 GLIBC_2.2.3 A
 GLIBC_2.2.3 pthread_getattr_np F
 GLIBC_2.2.6 GLIBC_2.2.6 A
 GLIBC_2.2.6 __nanosleep F
+GLIBC_2.26 GLIBC_2.26 A
+GLIBC_2.26 call_once F
+GLIBC_2.26 cnd_broadcast F
+GLIBC_2.26 cnd_destroy F
+GLIBC_2.26 cnd_init F
+GLIBC_2.26 cnd_signal F
+GLIBC_2.26 cnd_timedwait F
+GLIBC_2.26 cnd_wait F
+GLIBC_2.26 mtx_destroy F
+GLIBC_2.26 mtx_init F
+GLIBC_2.26 mtx_lock F
+GLIBC_2.26 mtx_timedlock F
+GLIBC_2.26 mtx_trylock F
+GLIBC_2.26 mtx_unlock F
+GLIBC_2.26 thrd_create F
+GLIBC_2.26 thrd_current F
+GLIBC_2.26 thrd_detach F
+GLIBC_2.26 thrd_equal F
+GLIBC_2.26 thrd_exit F
+GLIBC_2.26 thrd_join F
+GLIBC_2.26 thrd_sleep F
+GLIBC_2.26 thrd_yield F
+GLIBC_2.26 tss_create F
+GLIBC_2.26 tss_delete F
+GLIBC_2.26 tss_get F
+GLIBC_2.26 tss_set F
 GLIBC_2.3.2 GLIBC_2.3.2 A
 GLIBC_2.3.2 pthread_cond_broadcast F
 GLIBC_2.3.2 pthread_cond_destroy F
diff --git a/sysdeps/unix/sysv/linux/i386/libpthread.abilist b/sysdeps/unix/sysv/linux/i386/libpthread.abilist
index 8f9c325..1e3aeae 100644
--- a/sysdeps/unix/sysv/linux/i386/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/i386/libpthread.abilist
@@ -216,6 +216,32 @@  GLIBC_2.2.3 GLIBC_2.2.3 A
 GLIBC_2.2.3 pthread_getattr_np F
 GLIBC_2.2.6 GLIBC_2.2.6 A
 GLIBC_2.2.6 __nanosleep F
+GLIBC_2.26 GLIBC_2.26 A
+GLIBC_2.26 call_once F
+GLIBC_2.26 cnd_broadcast F
+GLIBC_2.26 cnd_destroy F
+GLIBC_2.26 cnd_init F
+GLIBC_2.26 cnd_signal F
+GLIBC_2.26 cnd_timedwait F
+GLIBC_2.26 cnd_wait F
+GLIBC_2.26 mtx_destroy F
+GLIBC_2.26 mtx_init F
+GLIBC_2.26 mtx_lock F
+GLIBC_2.26 mtx_timedlock F
+GLIBC_2.26 mtx_trylock F
+GLIBC_2.26 mtx_unlock F
+GLIBC_2.26 thrd_create F
+GLIBC_2.26 thrd_current F
+GLIBC_2.26 thrd_detach F
+GLIBC_2.26 thrd_equal F
+GLIBC_2.26 thrd_exit F
+GLIBC_2.26 thrd_join F
+GLIBC_2.26 thrd_sleep F
+GLIBC_2.26 thrd_yield F
+GLIBC_2.26 tss_create F
+GLIBC_2.26 tss_delete F
+GLIBC_2.26 tss_get F
+GLIBC_2.26 tss_set F
 GLIBC_2.3.2 GLIBC_2.3.2 A
 GLIBC_2.3.2 pthread_cond_broadcast F
 GLIBC_2.3.2 pthread_cond_destroy F
diff --git a/sysdeps/unix/sysv/linux/ia64/libpthread.abilist b/sysdeps/unix/sysv/linux/ia64/libpthread.abilist
index d4c8ded..a87669f 100644
--- a/sysdeps/unix/sysv/linux/ia64/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/ia64/libpthread.abilist
@@ -204,6 +204,32 @@  GLIBC_2.2.3 GLIBC_2.2.3 A
 GLIBC_2.2.3 pthread_getattr_np F
 GLIBC_2.2.6 GLIBC_2.2.6 A
 GLIBC_2.2.6 __nanosleep F
+GLIBC_2.26 GLIBC_2.26 A
+GLIBC_2.26 call_once F
+GLIBC_2.26 cnd_broadcast F
+GLIBC_2.26 cnd_destroy F
+GLIBC_2.26 cnd_init F
+GLIBC_2.26 cnd_signal F
+GLIBC_2.26 cnd_timedwait F
+GLIBC_2.26 cnd_wait F
+GLIBC_2.26 mtx_destroy F
+GLIBC_2.26 mtx_init F
+GLIBC_2.26 mtx_lock F
+GLIBC_2.26 mtx_timedlock F
+GLIBC_2.26 mtx_trylock F
+GLIBC_2.26 mtx_unlock F
+GLIBC_2.26 thrd_create F
+GLIBC_2.26 thrd_current F
+GLIBC_2.26 thrd_detach F
+GLIBC_2.26 thrd_equal F
+GLIBC_2.26 thrd_exit F
+GLIBC_2.26 thrd_join F
+GLIBC_2.26 thrd_sleep F
+GLIBC_2.26 thrd_yield F
+GLIBC_2.26 tss_create F
+GLIBC_2.26 tss_delete F
+GLIBC_2.26 tss_get F
+GLIBC_2.26 tss_set F
 GLIBC_2.3.2 GLIBC_2.3.2 A
 GLIBC_2.3.2 pthread_cond_broadcast F
 GLIBC_2.3.2 pthread_cond_destroy F
diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/libpthread.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/libpthread.abilist
index 91545c1..7c39603 100644
--- a/sysdeps/unix/sysv/linux/m68k/coldfire/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/m68k/coldfire/libpthread.abilist
@@ -9,6 +9,32 @@  GLIBC_2.12 pthread_setname_np F
 GLIBC_2.18 GLIBC_2.18 A
 GLIBC_2.18 pthread_getattr_default_np F
 GLIBC_2.18 pthread_setattr_default_np F
+GLIBC_2.26 GLIBC_2.26 A
+GLIBC_2.26 call_once F
+GLIBC_2.26 cnd_broadcast F
+GLIBC_2.26 cnd_destroy F
+GLIBC_2.26 cnd_init F
+GLIBC_2.26 cnd_signal F
+GLIBC_2.26 cnd_timedwait F
+GLIBC_2.26 cnd_wait F
+GLIBC_2.26 mtx_destroy F
+GLIBC_2.26 mtx_init F
+GLIBC_2.26 mtx_lock F
+GLIBC_2.26 mtx_timedlock F
+GLIBC_2.26 mtx_trylock F
+GLIBC_2.26 mtx_unlock F
+GLIBC_2.26 thrd_create F
+GLIBC_2.26 thrd_current F
+GLIBC_2.26 thrd_detach F
+GLIBC_2.26 thrd_equal F
+GLIBC_2.26 thrd_exit F
+GLIBC_2.26 thrd_join F
+GLIBC_2.26 thrd_sleep F
+GLIBC_2.26 thrd_yield F
+GLIBC_2.26 tss_create F
+GLIBC_2.26 tss_delete F
+GLIBC_2.26 tss_get F
+GLIBC_2.26 tss_set F
 GLIBC_2.4 GLIBC_2.4 A
 GLIBC_2.4 _IO_flockfile F
 GLIBC_2.4 _IO_ftrylockfile F
diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/libpthread.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/libpthread.abilist
index 8f9c325..1e3aeae 100644
--- a/sysdeps/unix/sysv/linux/m68k/m680x0/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/m68k/m680x0/libpthread.abilist
@@ -216,6 +216,32 @@  GLIBC_2.2.3 GLIBC_2.2.3 A
 GLIBC_2.2.3 pthread_getattr_np F
 GLIBC_2.2.6 GLIBC_2.2.6 A
 GLIBC_2.2.6 __nanosleep F
+GLIBC_2.26 GLIBC_2.26 A
+GLIBC_2.26 call_once F
+GLIBC_2.26 cnd_broadcast F
+GLIBC_2.26 cnd_destroy F
+GLIBC_2.26 cnd_init F
+GLIBC_2.26 cnd_signal F
+GLIBC_2.26 cnd_timedwait F
+GLIBC_2.26 cnd_wait F
+GLIBC_2.26 mtx_destroy F
+GLIBC_2.26 mtx_init F
+GLIBC_2.26 mtx_lock F
+GLIBC_2.26 mtx_timedlock F
+GLIBC_2.26 mtx_trylock F
+GLIBC_2.26 mtx_unlock F
+GLIBC_2.26 thrd_create F
+GLIBC_2.26 thrd_current F
+GLIBC_2.26 thrd_detach F
+GLIBC_2.26 thrd_equal F
+GLIBC_2.26 thrd_exit F
+GLIBC_2.26 thrd_join F
+GLIBC_2.26 thrd_sleep F
+GLIBC_2.26 thrd_yield F
+GLIBC_2.26 tss_create F
+GLIBC_2.26 tss_delete F
+GLIBC_2.26 tss_get F
+GLIBC_2.26 tss_set F
 GLIBC_2.3.2 GLIBC_2.3.2 A
 GLIBC_2.3.2 pthread_cond_broadcast F
 GLIBC_2.3.2 pthread_cond_destroy F
diff --git a/sysdeps/unix/sysv/linux/microblaze/libpthread.abilist b/sysdeps/unix/sysv/linux/microblaze/libpthread.abilist
index 00d948b..07e3831 100644
--- a/sysdeps/unix/sysv/linux/microblaze/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/microblaze/libpthread.abilist
@@ -223,3 +223,29 @@  GLIBC_2.18 vfork F
 GLIBC_2.18 wait F
 GLIBC_2.18 waitpid F
 GLIBC_2.18 write F
+GLIBC_2.26 GLIBC_2.26 A
+GLIBC_2.26 call_once F
+GLIBC_2.26 cnd_broadcast F
+GLIBC_2.26 cnd_destroy F
+GLIBC_2.26 cnd_init F
+GLIBC_2.26 cnd_signal F
+GLIBC_2.26 cnd_timedwait F
+GLIBC_2.26 cnd_wait F
+GLIBC_2.26 mtx_destroy F
+GLIBC_2.26 mtx_init F
+GLIBC_2.26 mtx_lock F
+GLIBC_2.26 mtx_timedlock F
+GLIBC_2.26 mtx_trylock F
+GLIBC_2.26 mtx_unlock F
+GLIBC_2.26 thrd_create F
+GLIBC_2.26 thrd_current F
+GLIBC_2.26 thrd_detach F
+GLIBC_2.26 thrd_equal F
+GLIBC_2.26 thrd_exit F
+GLIBC_2.26 thrd_join F
+GLIBC_2.26 thrd_sleep F
+GLIBC_2.26 thrd_yield F
+GLIBC_2.26 tss_create F
+GLIBC_2.26 tss_delete F
+GLIBC_2.26 tss_get F
+GLIBC_2.26 tss_set F
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/libpthread.abilist b/sysdeps/unix/sysv/linux/mips/mips32/libpthread.abilist
index 280d99d..53d3d1c 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips32/libpthread.abilist
@@ -213,6 +213,32 @@  GLIBC_2.2.3 GLIBC_2.2.3 A
 GLIBC_2.2.3 pthread_getattr_np F
 GLIBC_2.2.6 GLIBC_2.2.6 A
 GLIBC_2.2.6 __nanosleep F
+GLIBC_2.26 GLIBC_2.26 A
+GLIBC_2.26 call_once F
+GLIBC_2.26 cnd_broadcast F
+GLIBC_2.26 cnd_destroy F
+GLIBC_2.26 cnd_init F
+GLIBC_2.26 cnd_signal F
+GLIBC_2.26 cnd_timedwait F
+GLIBC_2.26 cnd_wait F
+GLIBC_2.26 mtx_destroy F
+GLIBC_2.26 mtx_init F
+GLIBC_2.26 mtx_lock F
+GLIBC_2.26 mtx_timedlock F
+GLIBC_2.26 mtx_trylock F
+GLIBC_2.26 mtx_unlock F
+GLIBC_2.26 thrd_create F
+GLIBC_2.26 thrd_current F
+GLIBC_2.26 thrd_detach F
+GLIBC_2.26 thrd_equal F
+GLIBC_2.26 thrd_exit F
+GLIBC_2.26 thrd_join F
+GLIBC_2.26 thrd_sleep F
+GLIBC_2.26 thrd_yield F
+GLIBC_2.26 tss_create F
+GLIBC_2.26 tss_delete F
+GLIBC_2.26 tss_get F
+GLIBC_2.26 tss_set F
 GLIBC_2.3.2 GLIBC_2.3.2 A
 GLIBC_2.3.2 pthread_cond_broadcast F
 GLIBC_2.3.2 pthread_cond_destroy F
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/libpthread.abilist b/sysdeps/unix/sysv/linux/mips/mips64/libpthread.abilist
index ad55bdd..7aabe95 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips64/libpthread.abilist
@@ -213,6 +213,32 @@  GLIBC_2.2.3 GLIBC_2.2.3 A
 GLIBC_2.2.3 pthread_getattr_np F
 GLIBC_2.2.6 GLIBC_2.2.6 A
 GLIBC_2.2.6 __nanosleep F
+GLIBC_2.26 GLIBC_2.26 A
+GLIBC_2.26 call_once F
+GLIBC_2.26 cnd_broadcast F
+GLIBC_2.26 cnd_destroy F
+GLIBC_2.26 cnd_init F
+GLIBC_2.26 cnd_signal F
+GLIBC_2.26 cnd_timedwait F
+GLIBC_2.26 cnd_wait F
+GLIBC_2.26 mtx_destroy F
+GLIBC_2.26 mtx_init F
+GLIBC_2.26 mtx_lock F
+GLIBC_2.26 mtx_timedlock F
+GLIBC_2.26 mtx_trylock F
+GLIBC_2.26 mtx_unlock F
+GLIBC_2.26 thrd_create F
+GLIBC_2.26 thrd_current F
+GLIBC_2.26 thrd_detach F
+GLIBC_2.26 thrd_equal F
+GLIBC_2.26 thrd_exit F
+GLIBC_2.26 thrd_join F
+GLIBC_2.26 thrd_sleep F
+GLIBC_2.26 thrd_yield F
+GLIBC_2.26 tss_create F
+GLIBC_2.26 tss_delete F
+GLIBC_2.26 tss_get F
+GLIBC_2.26 tss_set F
 GLIBC_2.3.2 GLIBC_2.3.2 A
 GLIBC_2.3.2 pthread_cond_broadcast F
 GLIBC_2.3.2 pthread_cond_destroy F
diff --git a/sysdeps/unix/sysv/linux/nios2/libpthread.abilist b/sysdeps/unix/sysv/linux/nios2/libpthread.abilist
index a10bbde..c117ce5 100644
--- a/sysdeps/unix/sysv/linux/nios2/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/nios2/libpthread.abilist
@@ -221,3 +221,29 @@  GLIBC_2.21 tcdrain F
 GLIBC_2.21 wait F
 GLIBC_2.21 waitpid F
 GLIBC_2.21 write F
+GLIBC_2.26 GLIBC_2.26 A
+GLIBC_2.26 call_once F
+GLIBC_2.26 cnd_broadcast F
+GLIBC_2.26 cnd_destroy F
+GLIBC_2.26 cnd_init F
+GLIBC_2.26 cnd_signal F
+GLIBC_2.26 cnd_timedwait F
+GLIBC_2.26 cnd_wait F
+GLIBC_2.26 mtx_destroy F
+GLIBC_2.26 mtx_init F
+GLIBC_2.26 mtx_lock F
+GLIBC_2.26 mtx_timedlock F
+GLIBC_2.26 mtx_trylock F
+GLIBC_2.26 mtx_unlock F
+GLIBC_2.26 thrd_create F
+GLIBC_2.26 thrd_current F
+GLIBC_2.26 thrd_detach F
+GLIBC_2.26 thrd_equal F
+GLIBC_2.26 thrd_exit F
+GLIBC_2.26 thrd_join F
+GLIBC_2.26 thrd_sleep F
+GLIBC_2.26 thrd_yield F
+GLIBC_2.26 tss_create F
+GLIBC_2.26 tss_delete F
+GLIBC_2.26 tss_get F
+GLIBC_2.26 tss_set F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/libpthread.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/libpthread.abilist
index 14c3a86..160b523 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/libpthread.abilist
@@ -216,6 +216,32 @@  GLIBC_2.2.3 GLIBC_2.2.3 A
 GLIBC_2.2.3 pthread_getattr_np F
 GLIBC_2.2.6 GLIBC_2.2.6 A
 GLIBC_2.2.6 __nanosleep F
+GLIBC_2.26 GLIBC_2.26 A
+GLIBC_2.26 call_once F
+GLIBC_2.26 cnd_broadcast F
+GLIBC_2.26 cnd_destroy F
+GLIBC_2.26 cnd_init F
+GLIBC_2.26 cnd_signal F
+GLIBC_2.26 cnd_timedwait F
+GLIBC_2.26 cnd_wait F
+GLIBC_2.26 mtx_destroy F
+GLIBC_2.26 mtx_init F
+GLIBC_2.26 mtx_lock F
+GLIBC_2.26 mtx_timedlock F
+GLIBC_2.26 mtx_trylock F
+GLIBC_2.26 mtx_unlock F
+GLIBC_2.26 thrd_create F
+GLIBC_2.26 thrd_current F
+GLIBC_2.26 thrd_detach F
+GLIBC_2.26 thrd_equal F
+GLIBC_2.26 thrd_exit F
+GLIBC_2.26 thrd_join F
+GLIBC_2.26 thrd_sleep F
+GLIBC_2.26 thrd_yield F
+GLIBC_2.26 tss_create F
+GLIBC_2.26 tss_delete F
+GLIBC_2.26 tss_get F
+GLIBC_2.26 tss_set F
 GLIBC_2.3.2 GLIBC_2.3.2 A
 GLIBC_2.3.2 pthread_cond_broadcast F
 GLIBC_2.3.2 pthread_cond_destroy F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/libpthread-le.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libpthread-le.abilist
index 0cf30ee..475ecd6 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/libpthread-le.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libpthread-le.abilist
@@ -224,3 +224,29 @@  GLIBC_2.17 write F
 GLIBC_2.18 GLIBC_2.18 A
 GLIBC_2.18 pthread_getattr_default_np F
 GLIBC_2.18 pthread_setattr_default_np F
+GLIBC_2.25 GLIBC_2.25 A
+GLIBC_2.25 call_once F
+GLIBC_2.25 cnd_broadcast F
+GLIBC_2.25 cnd_destroy F
+GLIBC_2.25 cnd_init F
+GLIBC_2.25 cnd_signal F
+GLIBC_2.25 cnd_timedwait F
+GLIBC_2.25 cnd_wait F
+GLIBC_2.25 mtx_destroy F
+GLIBC_2.25 mtx_init F
+GLIBC_2.25 mtx_lock F
+GLIBC_2.25 mtx_timedlock F
+GLIBC_2.25 mtx_trylock F
+GLIBC_2.25 mtx_unlock F
+GLIBC_2.25 thrd_create F
+GLIBC_2.25 thrd_current F
+GLIBC_2.25 thrd_detach F
+GLIBC_2.25 thrd_equal F
+GLIBC_2.25 thrd_exit F
+GLIBC_2.25 thrd_join F
+GLIBC_2.25 thrd_sleep F
+GLIBC_2.25 thrd_yield F
+GLIBC_2.25 tss_create F
+GLIBC_2.25 tss_delete F
+GLIBC_2.25 tss_get F
+GLIBC_2.25 tss_set F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/libpthread.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libpthread.abilist
index 464b91a..7881e7b 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libpthread.abilist
@@ -9,6 +9,32 @@  GLIBC_2.12 pthread_setname_np F
 GLIBC_2.18 GLIBC_2.18 A
 GLIBC_2.18 pthread_getattr_default_np F
 GLIBC_2.18 pthread_setattr_default_np F
+GLIBC_2.26 GLIBC_2.26 A
+GLIBC_2.26 call_once F
+GLIBC_2.26 cnd_broadcast F
+GLIBC_2.26 cnd_destroy F
+GLIBC_2.26 cnd_init F
+GLIBC_2.26 cnd_signal F
+GLIBC_2.26 cnd_timedwait F
+GLIBC_2.26 cnd_wait F
+GLIBC_2.26 mtx_destroy F
+GLIBC_2.26 mtx_init F
+GLIBC_2.26 mtx_lock F
+GLIBC_2.26 mtx_timedlock F
+GLIBC_2.26 mtx_trylock F
+GLIBC_2.26 mtx_unlock F
+GLIBC_2.26 thrd_create F
+GLIBC_2.26 thrd_current F
+GLIBC_2.26 thrd_detach F
+GLIBC_2.26 thrd_equal F
+GLIBC_2.26 thrd_exit F
+GLIBC_2.26 thrd_join F
+GLIBC_2.26 thrd_sleep F
+GLIBC_2.26 thrd_yield F
+GLIBC_2.26 tss_create F
+GLIBC_2.26 tss_delete F
+GLIBC_2.26 tss_get F
+GLIBC_2.26 tss_set F
 GLIBC_2.3 GLIBC_2.3 A
 GLIBC_2.3 _IO_flockfile F
 GLIBC_2.3 _IO_ftrylockfile F
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/libpthread.abilist b/sysdeps/unix/sysv/linux/s390/s390-32/libpthread.abilist
index 3c5e11a..0a98f27 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/libpthread.abilist
@@ -219,6 +219,32 @@  GLIBC_2.2.3 GLIBC_2.2.3 A
 GLIBC_2.2.3 pthread_getattr_np F
 GLIBC_2.2.6 GLIBC_2.2.6 A
 GLIBC_2.2.6 __nanosleep F
+GLIBC_2.26 GLIBC_2.26 A
+GLIBC_2.26 call_once F
+GLIBC_2.26 cnd_broadcast F
+GLIBC_2.26 cnd_destroy F
+GLIBC_2.26 cnd_init F
+GLIBC_2.26 cnd_signal F
+GLIBC_2.26 cnd_timedwait F
+GLIBC_2.26 cnd_wait F
+GLIBC_2.26 mtx_destroy F
+GLIBC_2.26 mtx_init F
+GLIBC_2.26 mtx_lock F
+GLIBC_2.26 mtx_timedlock F
+GLIBC_2.26 mtx_trylock F
+GLIBC_2.26 mtx_unlock F
+GLIBC_2.26 thrd_create F
+GLIBC_2.26 thrd_current F
+GLIBC_2.26 thrd_detach F
+GLIBC_2.26 thrd_equal F
+GLIBC_2.26 thrd_exit F
+GLIBC_2.26 thrd_join F
+GLIBC_2.26 thrd_sleep F
+GLIBC_2.26 thrd_yield F
+GLIBC_2.26 tss_create F
+GLIBC_2.26 tss_delete F
+GLIBC_2.26 tss_get F
+GLIBC_2.26 tss_set F
 GLIBC_2.3.2 GLIBC_2.3.2 A
 GLIBC_2.3.2 pthread_cond_broadcast F
 GLIBC_2.3.2 pthread_cond_destroy F
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/libpthread.abilist b/sysdeps/unix/sysv/linux/s390/s390-64/libpthread.abilist
index 83a1fcd..c3fe23b 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/libpthread.abilist
@@ -207,6 +207,32 @@  GLIBC_2.2.3 GLIBC_2.2.3 A
 GLIBC_2.2.3 pthread_getattr_np F
 GLIBC_2.2.6 GLIBC_2.2.6 A
 GLIBC_2.2.6 __nanosleep F
+GLIBC_2.26 GLIBC_2.26 A
+GLIBC_2.26 call_once F
+GLIBC_2.26 cnd_broadcast F
+GLIBC_2.26 cnd_destroy F
+GLIBC_2.26 cnd_init F
+GLIBC_2.26 cnd_signal F
+GLIBC_2.26 cnd_timedwait F
+GLIBC_2.26 cnd_wait F
+GLIBC_2.26 mtx_destroy F
+GLIBC_2.26 mtx_init F
+GLIBC_2.26 mtx_lock F
+GLIBC_2.26 mtx_timedlock F
+GLIBC_2.26 mtx_trylock F
+GLIBC_2.26 mtx_unlock F
+GLIBC_2.26 thrd_create F
+GLIBC_2.26 thrd_current F
+GLIBC_2.26 thrd_detach F
+GLIBC_2.26 thrd_equal F
+GLIBC_2.26 thrd_exit F
+GLIBC_2.26 thrd_join F
+GLIBC_2.26 thrd_sleep F
+GLIBC_2.26 thrd_yield F
+GLIBC_2.26 tss_create F
+GLIBC_2.26 tss_delete F
+GLIBC_2.26 tss_get F
+GLIBC_2.26 tss_set F
 GLIBC_2.3.2 GLIBC_2.3.2 A
 GLIBC_2.3.2 pthread_cond_broadcast F
 GLIBC_2.3.2 pthread_cond_destroy F
diff --git a/sysdeps/unix/sysv/linux/sh/libpthread.abilist b/sysdeps/unix/sysv/linux/sh/libpthread.abilist
index a73aa43..4d1dbc5 100644
--- a/sysdeps/unix/sysv/linux/sh/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/sh/libpthread.abilist
@@ -204,6 +204,32 @@  GLIBC_2.2.3 GLIBC_2.2.3 A
 GLIBC_2.2.3 pthread_getattr_np F
 GLIBC_2.2.6 GLIBC_2.2.6 A
 GLIBC_2.2.6 __nanosleep F
+GLIBC_2.26 GLIBC_2.26 A
+GLIBC_2.26 call_once F
+GLIBC_2.26 cnd_broadcast F
+GLIBC_2.26 cnd_destroy F
+GLIBC_2.26 cnd_init F
+GLIBC_2.26 cnd_signal F
+GLIBC_2.26 cnd_timedwait F
+GLIBC_2.26 cnd_wait F
+GLIBC_2.26 mtx_destroy F
+GLIBC_2.26 mtx_init F
+GLIBC_2.26 mtx_lock F
+GLIBC_2.26 mtx_timedlock F
+GLIBC_2.26 mtx_trylock F
+GLIBC_2.26 mtx_unlock F
+GLIBC_2.26 thrd_create F
+GLIBC_2.26 thrd_current F
+GLIBC_2.26 thrd_detach F
+GLIBC_2.26 thrd_equal F
+GLIBC_2.26 thrd_exit F
+GLIBC_2.26 thrd_join F
+GLIBC_2.26 thrd_sleep F
+GLIBC_2.26 thrd_yield F
+GLIBC_2.26 tss_create F
+GLIBC_2.26 tss_delete F
+GLIBC_2.26 tss_get F
+GLIBC_2.26 tss_set F
 GLIBC_2.3.2 GLIBC_2.3.2 A
 GLIBC_2.3.2 pthread_cond_broadcast F
 GLIBC_2.3.2 pthread_cond_destroy F
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/libpthread.abilist b/sysdeps/unix/sysv/linux/sparc/sparc32/libpthread.abilist
index 7e121d4..bf852a0 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/libpthread.abilist
@@ -216,6 +216,32 @@  GLIBC_2.2.3 GLIBC_2.2.3 A
 GLIBC_2.2.3 pthread_getattr_np F
 GLIBC_2.2.6 GLIBC_2.2.6 A
 GLIBC_2.2.6 __nanosleep F
+GLIBC_2.26 GLIBC_2.26 A
+GLIBC_2.26 call_once F
+GLIBC_2.26 cnd_broadcast F
+GLIBC_2.26 cnd_destroy F
+GLIBC_2.26 cnd_init F
+GLIBC_2.26 cnd_signal F
+GLIBC_2.26 cnd_timedwait F
+GLIBC_2.26 cnd_wait F
+GLIBC_2.26 mtx_destroy F
+GLIBC_2.26 mtx_init F
+GLIBC_2.26 mtx_lock F
+GLIBC_2.26 mtx_timedlock F
+GLIBC_2.26 mtx_trylock F
+GLIBC_2.26 mtx_unlock F
+GLIBC_2.26 thrd_create F
+GLIBC_2.26 thrd_current F
+GLIBC_2.26 thrd_detach F
+GLIBC_2.26 thrd_equal F
+GLIBC_2.26 thrd_exit F
+GLIBC_2.26 thrd_join F
+GLIBC_2.26 thrd_sleep F
+GLIBC_2.26 thrd_yield F
+GLIBC_2.26 tss_create F
+GLIBC_2.26 tss_delete F
+GLIBC_2.26 tss_get F
+GLIBC_2.26 tss_set F
 GLIBC_2.3.2 GLIBC_2.3.2 A
 GLIBC_2.3.2 pthread_cond_broadcast F
 GLIBC_2.3.2 pthread_cond_destroy F
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/libpthread.abilist b/sysdeps/unix/sysv/linux/sparc/sparc64/libpthread.abilist
index d4c8ded..a87669f 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/libpthread.abilist
@@ -204,6 +204,32 @@  GLIBC_2.2.3 GLIBC_2.2.3 A
 GLIBC_2.2.3 pthread_getattr_np F
 GLIBC_2.2.6 GLIBC_2.2.6 A
 GLIBC_2.2.6 __nanosleep F
+GLIBC_2.26 GLIBC_2.26 A
+GLIBC_2.26 call_once F
+GLIBC_2.26 cnd_broadcast F
+GLIBC_2.26 cnd_destroy F
+GLIBC_2.26 cnd_init F
+GLIBC_2.26 cnd_signal F
+GLIBC_2.26 cnd_timedwait F
+GLIBC_2.26 cnd_wait F
+GLIBC_2.26 mtx_destroy F
+GLIBC_2.26 mtx_init F
+GLIBC_2.26 mtx_lock F
+GLIBC_2.26 mtx_timedlock F
+GLIBC_2.26 mtx_trylock F
+GLIBC_2.26 mtx_unlock F
+GLIBC_2.26 thrd_create F
+GLIBC_2.26 thrd_current F
+GLIBC_2.26 thrd_detach F
+GLIBC_2.26 thrd_equal F
+GLIBC_2.26 thrd_exit F
+GLIBC_2.26 thrd_join F
+GLIBC_2.26 thrd_sleep F
+GLIBC_2.26 thrd_yield F
+GLIBC_2.26 tss_create F
+GLIBC_2.26 tss_delete F
+GLIBC_2.26 tss_get F
+GLIBC_2.26 tss_set F
 GLIBC_2.3.2 GLIBC_2.3.2 A
 GLIBC_2.3.2 pthread_cond_broadcast F
 GLIBC_2.3.2 pthread_cond_destroy F
diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/libpthread.abilist b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/libpthread.abilist
index d16158f..1e538e8 100644
--- a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/libpthread.abilist
@@ -224,3 +224,29 @@  GLIBC_2.12 write F
 GLIBC_2.18 GLIBC_2.18 A
 GLIBC_2.18 pthread_getattr_default_np F
 GLIBC_2.18 pthread_setattr_default_np F
+GLIBC_2.26 GLIBC_2.26 A
+GLIBC_2.26 call_once F
+GLIBC_2.26 cnd_broadcast F
+GLIBC_2.26 cnd_destroy F
+GLIBC_2.26 cnd_init F
+GLIBC_2.26 cnd_signal F
+GLIBC_2.26 cnd_timedwait F
+GLIBC_2.26 cnd_wait F
+GLIBC_2.26 mtx_destroy F
+GLIBC_2.26 mtx_init F
+GLIBC_2.26 mtx_lock F
+GLIBC_2.26 mtx_timedlock F
+GLIBC_2.26 mtx_trylock F
+GLIBC_2.26 mtx_unlock F
+GLIBC_2.26 thrd_create F
+GLIBC_2.26 thrd_current F
+GLIBC_2.26 thrd_detach F
+GLIBC_2.26 thrd_equal F
+GLIBC_2.26 thrd_exit F
+GLIBC_2.26 thrd_join F
+GLIBC_2.26 thrd_sleep F
+GLIBC_2.26 thrd_yield F
+GLIBC_2.26 tss_create F
+GLIBC_2.26 tss_delete F
+GLIBC_2.26 tss_get F
+GLIBC_2.26 tss_set F
diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/libpthread.abilist b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/libpthread.abilist
index d16158f..1e538e8 100644
--- a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/libpthread.abilist
@@ -224,3 +224,29 @@  GLIBC_2.12 write F
 GLIBC_2.18 GLIBC_2.18 A
 GLIBC_2.18 pthread_getattr_default_np F
 GLIBC_2.18 pthread_setattr_default_np F
+GLIBC_2.26 GLIBC_2.26 A
+GLIBC_2.26 call_once F
+GLIBC_2.26 cnd_broadcast F
+GLIBC_2.26 cnd_destroy F
+GLIBC_2.26 cnd_init F
+GLIBC_2.26 cnd_signal F
+GLIBC_2.26 cnd_timedwait F
+GLIBC_2.26 cnd_wait F
+GLIBC_2.26 mtx_destroy F
+GLIBC_2.26 mtx_init F
+GLIBC_2.26 mtx_lock F
+GLIBC_2.26 mtx_timedlock F
+GLIBC_2.26 mtx_trylock F
+GLIBC_2.26 mtx_unlock F
+GLIBC_2.26 thrd_create F
+GLIBC_2.26 thrd_current F
+GLIBC_2.26 thrd_detach F
+GLIBC_2.26 thrd_equal F
+GLIBC_2.26 thrd_exit F
+GLIBC_2.26 thrd_join F
+GLIBC_2.26 thrd_sleep F
+GLIBC_2.26 thrd_yield F
+GLIBC_2.26 tss_create F
+GLIBC_2.26 tss_delete F
+GLIBC_2.26 tss_get F
+GLIBC_2.26 tss_set F
diff --git a/sysdeps/unix/sysv/linux/tile/tilepro/libpthread.abilist b/sysdeps/unix/sysv/linux/tile/tilepro/libpthread.abilist
index d16158f..1e538e8 100644
--- a/sysdeps/unix/sysv/linux/tile/tilepro/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/tile/tilepro/libpthread.abilist
@@ -224,3 +224,29 @@  GLIBC_2.12 write F
 GLIBC_2.18 GLIBC_2.18 A
 GLIBC_2.18 pthread_getattr_default_np F
 GLIBC_2.18 pthread_setattr_default_np F
+GLIBC_2.26 GLIBC_2.26 A
+GLIBC_2.26 call_once F
+GLIBC_2.26 cnd_broadcast F
+GLIBC_2.26 cnd_destroy F
+GLIBC_2.26 cnd_init F
+GLIBC_2.26 cnd_signal F
+GLIBC_2.26 cnd_timedwait F
+GLIBC_2.26 cnd_wait F
+GLIBC_2.26 mtx_destroy F
+GLIBC_2.26 mtx_init F
+GLIBC_2.26 mtx_lock F
+GLIBC_2.26 mtx_timedlock F
+GLIBC_2.26 mtx_trylock F
+GLIBC_2.26 mtx_unlock F
+GLIBC_2.26 thrd_create F
+GLIBC_2.26 thrd_current F
+GLIBC_2.26 thrd_detach F
+GLIBC_2.26 thrd_equal F
+GLIBC_2.26 thrd_exit F
+GLIBC_2.26 thrd_join F
+GLIBC_2.26 thrd_sleep F
+GLIBC_2.26 thrd_yield F
+GLIBC_2.26 tss_create F
+GLIBC_2.26 tss_delete F
+GLIBC_2.26 tss_get F
+GLIBC_2.26 tss_set F
diff --git a/sysdeps/unix/sysv/linux/x86_64/64/libpthread.abilist b/sysdeps/unix/sysv/linux/x86_64/64/libpthread.abilist
index 85365c0..2395f5d 100644
--- a/sysdeps/unix/sysv/linux/x86_64/64/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/x86_64/64/libpthread.abilist
@@ -203,6 +203,32 @@  GLIBC_2.2.5 waitpid F
 GLIBC_2.2.5 write F
 GLIBC_2.2.6 GLIBC_2.2.6 A
 GLIBC_2.2.6 __nanosleep F
+GLIBC_2.26 GLIBC_2.26 A
+GLIBC_2.26 call_once F
+GLIBC_2.26 cnd_broadcast F
+GLIBC_2.26 cnd_destroy F
+GLIBC_2.26 cnd_init F
+GLIBC_2.26 cnd_signal F
+GLIBC_2.26 cnd_timedwait F
+GLIBC_2.26 cnd_wait F
+GLIBC_2.26 mtx_destroy F
+GLIBC_2.26 mtx_init F
+GLIBC_2.26 mtx_lock F
+GLIBC_2.26 mtx_timedlock F
+GLIBC_2.26 mtx_trylock F
+GLIBC_2.26 mtx_unlock F
+GLIBC_2.26 thrd_create F
+GLIBC_2.26 thrd_current F
+GLIBC_2.26 thrd_detach F
+GLIBC_2.26 thrd_equal F
+GLIBC_2.26 thrd_exit F
+GLIBC_2.26 thrd_join F
+GLIBC_2.26 thrd_sleep F
+GLIBC_2.26 thrd_yield F
+GLIBC_2.26 tss_create F
+GLIBC_2.26 tss_delete F
+GLIBC_2.26 tss_get F
+GLIBC_2.26 tss_set F
 GLIBC_2.3.2 GLIBC_2.3.2 A
 GLIBC_2.3.2 pthread_cond_broadcast F
 GLIBC_2.3.2 pthread_cond_destroy F
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/libpthread.abilist b/sysdeps/unix/sysv/linux/x86_64/x32/libpthread.abilist
index 6cd0fc3..42a39db 100644
--- a/sysdeps/unix/sysv/linux/x86_64/x32/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/x86_64/x32/libpthread.abilist
@@ -224,3 +224,29 @@  GLIBC_2.16 write F
 GLIBC_2.18 GLIBC_2.18 A
 GLIBC_2.18 pthread_getattr_default_np F
 GLIBC_2.18 pthread_setattr_default_np F
+GLIBC_2.26 GLIBC_2.26 A
+GLIBC_2.26 call_once F
+GLIBC_2.26 cnd_broadcast F
+GLIBC_2.26 cnd_destroy F
+GLIBC_2.26 cnd_init F
+GLIBC_2.26 cnd_signal F
+GLIBC_2.26 cnd_timedwait F
+GLIBC_2.26 cnd_wait F
+GLIBC_2.26 mtx_destroy F
+GLIBC_2.26 mtx_init F
+GLIBC_2.26 mtx_lock F
+GLIBC_2.26 mtx_timedlock F
+GLIBC_2.26 mtx_trylock F
+GLIBC_2.26 mtx_unlock F
+GLIBC_2.26 thrd_create F
+GLIBC_2.26 thrd_current F
+GLIBC_2.26 thrd_detach F
+GLIBC_2.26 thrd_equal F
+GLIBC_2.26 thrd_exit F
+GLIBC_2.26 thrd_join F
+GLIBC_2.26 thrd_sleep F
+GLIBC_2.26 thrd_yield F
+GLIBC_2.26 tss_create F
+GLIBC_2.26 tss_delete F
+GLIBC_2.26 tss_get F
+GLIBC_2.26 tss_set F
diff --git a/sysdeps/x86/nptl/bits/thread-shared-types.h b/sysdeps/x86/nptl/bits/thread-shared-types.h
index ffed07d..7795756 100644
--- a/sysdeps/x86/nptl/bits/thread-shared-types.h
+++ b/sysdeps/x86/nptl/bits/thread-shared-types.h
@@ -114,4 +114,7 @@  struct __pthread_mutex_s
   __extension__ long long int __align;
 
 
+/* Used to force once_flag alignment.  */
+#define __ONCE_FLAG_ALIGN
+
 #endif
diff --git a/sysdeps/x86_64/nptl/tls.h b/sysdeps/x86_64/nptl/tls.h
index 53b41bc..9f0aaa6 100644
--- a/sysdeps/x86_64/nptl/tls.h
+++ b/sysdeps/x86_64/nptl/tls.h
@@ -326,8 +326,8 @@  typedef struct
 	      abort (); })
 
 
-# define CALL_THREAD_FCT(descr) \
-  ({ void *__res;							      \
+# define CALL_THREAD_FCT(descr, c11) \
+  ({ union { void *voidr; int intr; } __res;				      \
      asm volatile ("movq %%fs:%P2, %%rdi\n\t"				      \
 		   "callq *%%fs:%P1"					      \
 		   : "=a" (__res)					      \
@@ -335,7 +335,7 @@  typedef struct
 		     "i" (offsetof (struct pthread, arg))		      \
 		   : "di", "si", "cx", "dx", "r8", "r9", "r10", "r11",	      \
 		     "memory", "cc");					      \
-     __res; })
+     c11 ? (void*) (intptr_t) __res.intr : __res.voidr; })
 
 
 /* Set the stack guard field in TCB head.  */
diff --git a/sysdeps/x86_64/x32/nptl/tls.h b/sysdeps/x86_64/x32/nptl/tls.h
index 68f65a6..1995877 100644
--- a/sysdeps/x86_64/x32/nptl/tls.h
+++ b/sysdeps/x86_64/x32/nptl/tls.h
@@ -29,7 +29,7 @@ 
    32 bits of the return-value register.  We then do the indirect call
    via the 64-bit return-value register.  */
 # undef CALL_THREAD_FCT
-# define CALL_THREAD_FCT(descr) \
+# define CALL_THREAD_FCT(descr, c11) \
   ({ void *__res;							      \
      asm volatile ("movl %%fs:%P2, %%edi\n\t"				      \
 		   "movl %%fs:%P1, %k0\n\t"				      \