This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH 3/5] [v2] Add C11 threads.h support.
- From: Juan Manuel Torres Palma <j dot m dot torrespalma at gmail dot com>
- To: libc-alpha at sourceware dot org
- Cc: Juan Manuel Torres Palma <jmtorrespalma at gmail dot com>
- Date: Tue, 11 Aug 2015 22:33:07 +0900
- Subject: [PATCH 3/5] [v2] Add C11 threads.h support.
- Authentication-results: sourceware.org; auth=none
From: Juan Manuel Torres Palma <jmtorrespalma@gmail.com>
This patch adds complete support for header threads.h including all
functions and types as specified in C11 standard (ISO/IEC 9899:2011).
All functions and types are based on POSIX threads to simplify
implementation and design.
2015-08-11 Juan Manuel Torres Palma <jmtorrespalma@gmail.com>
* nptl/Makefile (headers): Added threads.h.
(libpthread-routines): Added all threads.h functions.
* nptl/Versions (GLIBC_2.23): Likewise.
* include/stdc-predef.h (__STDC_NO_THREADS__): Remove macro.
* include/threads.h: New file.
(ONCE_FLAG_INIT, thread_local, TSS_DTOR_ITERATIONS): New macros.
(thrd_t, once_flag, tss_t, thrd_start_t, tss_dtor_t): New types.
(mtx_t, cnd_t): Likewise.
(thrd_success, thrd_busy, thrd_error, thrd_nomem, thrd_timeout):
New enum values.
(mtx_plain, mtx_recursive, mtx_timed): Likewise.
(thrd_create, thrd_equal, thrd_current, thrd_sleep, thrd_exit)
(thrd_detach, thrd_join, thrd_yield): New function prototype.
(mtx_init, mtx_lock, mtx_timedlock, mtx_trylock, mtx_unlock)
(mtx_destroy, call_once): Likewise.
(cnd_init, cnd_signal, cnd_broadcast, cnd_wait, cnd_timedwait)
(cnd_destroy): Likewise.
(tss_create, tss_get, tss_set, tss_delete): Likewise.
* nptl/__thrd_err_map.h: New file.
(__thrd_err_map): New function definition.
* nptl/call_once.c (call_once): Likewise.
* nptl/cnd_broadcast.c (cnd_broadcast): Likewise.
* nptl/cnd_destroy.c (cnd_destroy): Likewise.
* nptl/cnd_init.c (cnd_init): Likewise.
* nptl/cnd_signal.c (cnd_signal): Likewise.
* nptl/cnd_timedwait.c (cnd_timedwait): Likewise.
* nptl/cnd_wait.c (cnd_wait): Likewise.
* nptl/mtx_destroy.c (mtx_destroy): Likewise.
* nptl/mtx_init.c (mtx_init): Likewise.
* nptl/mtx_lock.c (mtx_lock): Likewise.
* nptl/mtx_timedlock.c (mtx_timedlock): Likewise.
* nptl/mtx_trylock.c (mtx_trylock): Likewise.
* nptl/mtx_unlock.c (mtx_unlock): Likewise.
* nptl/thrd_create.c (thrd_create): Likewise.
* nptl/thrd_current.c (thrd_current): Likewise.
* nptl/thrd_detach.c (thrd_detach): Likewise.
* nptl/thrd_equal.c (thrd_equal): Likewise.
* nptl/thrd_exit.c (thrd_exit): Likewise.
* nptl/thrd_join.c (thrd_join): Likewise.
* nptl/thrd_sleep.c (thrd_sleep): Likewise.
* nptl/thrd_yield.c (thrd_yield): Likewise.
* nptl/tss_create.c (tss_create): Likewise.
* nptl/tss_delete.c (tss_delete): Likewise.
* nptl/tss_get.c (tss_get): Likewise.
* nptl/tss_set.c (tss_set): Likewise.
* sysdeps/nacl/libpthread.abilist: Update ABI with new threads.h
functions.
* 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/coldfire/libpthread.abilist:
Likewise.
* sysdeps/unix/sysv/linux/m68k/m680x0/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.abilist:
Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/libpthread-le.abilist:
Likewise
* sysdeps/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.
* conform/Makefile (conformtest-headers-ISO): Add threads.h.
(linknamespace-libs-ISO11): Add libpthread.a.
* conform/data/threads.h-data: New test file for threads.h.
---
conform/Makefile | 9 +-
conform/data/threads.h-data | 56 ++++++
include/stdc-predef.h | 3 -
include/threads.h | 198 +++++++++++++++++++++
nptl/Makefile | 13 +-
nptl/Versions | 15 ++
nptl/__thrd_err_map.h | 43 +++++
nptl/call_once.c | 29 +++
nptl/cnd_broadcast.c | 30 ++++
nptl/cnd_destroy.c | 29 +++
nptl/cnd_init.c | 29 +++
nptl/cnd_signal.c | 30 ++++
nptl/cnd_timedwait.c | 33 ++++
nptl/cnd_wait.c | 31 ++++
nptl/mtx_destroy.c | 28 +++
nptl/mtx_init.c | 54 ++++++
nptl/mtx_lock.c | 31 ++++
nptl/mtx_timedlock.c | 35 ++++
nptl/mtx_trylock.c | 31 ++++
nptl/mtx_unlock.c | 31 ++++
nptl/thrd_create.c | 32 ++++
nptl/thrd_current.c | 28 +++
nptl/thrd_detach.c | 32 ++++
nptl/thrd_equal.c | 28 +++
nptl/thrd_exit.c | 34 ++++
nptl/thrd_join.c | 48 +++++
nptl/thrd_sleep.c | 34 ++++
nptl/thrd_yield.c | 29 +++
nptl/tss_create.c | 32 ++++
nptl/tss_delete.c | 30 ++++
nptl/tss_get.c | 30 ++++
nptl/tss_set.c | 30 ++++
sysdeps/nacl/libpthread.abilist | 27 +++
sysdeps/unix/sysv/linux/aarch64/libpthread.abilist | 27 +++
sysdeps/unix/sysv/linux/alpha/libpthread.abilist | 27 +++
sysdeps/unix/sysv/linux/arm/libpthread.abilist | 27 +++
sysdeps/unix/sysv/linux/hppa/libpthread.abilist | 27 +++
sysdeps/unix/sysv/linux/i386/libpthread.abilist | 27 +++
sysdeps/unix/sysv/linux/ia64/libpthread.abilist | 27 +++
.../sysv/linux/m68k/coldfire/libpthread.abilist | 27 +++
.../unix/sysv/linux/m68k/m680x0/libpthread.abilist | 27 +++
.../unix/sysv/linux/microblaze/libpthread.abilist | 27 +++
.../unix/sysv/linux/mips/mips32/libpthread.abilist | 27 +++
.../unix/sysv/linux/mips/mips64/libpthread.abilist | 27 +++
sysdeps/unix/sysv/linux/nios2/libpthread.abilist | 27 +++
.../linux/powerpc/powerpc32/libpthread.abilist | 27 +++
.../linux/powerpc/powerpc64/libpthread-le.abilist | 27 +++
.../linux/powerpc/powerpc64/libpthread.abilist | 27 +++
.../sysv/linux/s390/s390-32/libpthread.abilist | 27 +++
.../sysv/linux/s390/s390-64/libpthread.abilist | 27 +++
sysdeps/unix/sysv/linux/sh/libpthread.abilist | 27 +++
.../sysv/linux/sparc/sparc32/libpthread.abilist | 27 +++
.../sysv/linux/sparc/sparc64/libpthread.abilist | 27 +++
.../linux/tile/tilegx/tilegx32/libpthread.abilist | 27 +++
.../linux/tile/tilegx/tilegx64/libpthread.abilist | 27 +++
.../sysv/linux/tile/tilepro/libpthread.abilist | 27 +++
.../unix/sysv/linux/x86_64/64/libpthread.abilist | 27 +++
.../unix/sysv/linux/x86_64/x32/libpthread.abilist | 27 +++
58 files changed, 1838 insertions(+), 9 deletions(-)
create mode 100644 conform/data/threads.h-data
create mode 100644 include/threads.h
create mode 100644 nptl/__thrd_err_map.h
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_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
diff --git a/conform/Makefile b/conform/Makefile
index 7d0a3dd..11cdf2a 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 \
@@ -258,12 +258,13 @@ $(linknamespace-symlists-tests): $(objpfx)symlist-%: list-header-symbols.pl
> $@ 2> $@.err; \
$(evaluate-test)
-linknamespace-libs-isoc = $(common-objpfx)libc.a $(common-objpfx)math/libm.a
+linknamespace-libs-isoc = $(common-objpfx)libc.a $(common-objpfx)math/libm.a
linknamespace-libs = $(linknamespace-libs-isoc) \
$(common-objpfx)rt/librt.a $(static-thread-library)
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)
linknamespace-libs-XPG4 = $(linknamespace-libs-isoc)
linknamespace-libs-POSIX = $(linknamespace-libs)
diff --git a/conform/data/threads.h-data b/conform/data/threads.h-data
new file mode 100644
index 0000000..bbd810f
--- /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)
+
+allow-header time.h
+
+#endif
diff --git a/include/stdc-predef.h b/include/stdc-predef.h
index e5f1139..eb1557d 100644
--- a/include/stdc-predef.h
+++ b/include/stdc-predef.h
@@ -58,7 +58,4 @@
published. */
#define __STDC_ISO_10646__ 201304L
-/* We do not support C11 <threads.h>. */
-#define __STDC_NO_THREADS__ 1
-
#endif
diff --git a/include/threads.h b/include/threads.h
new file mode 100644
index 0000000..47ac416
--- /dev/null
+++ b/include/threads.h
@@ -0,0 +1,198 @@
+/* Copyright (C) 2015 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/>. */
+
+/*
+ * ISO C11 Standard: 7.26
+ * Thread support library <threads.h>
+ */
+
+
+#ifndef _THREADS_H
+#define _THREADS_H 1
+
+#include <features.h>
+#include <time.h>
+#include <bits/thread-shared-types.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; /* 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;
+
+
+__BEGIN_DECLS
+
+/* 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
+ 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 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. */
+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);
+
+__END_DECLS
+
+#endif /* _THREADS_H */
diff --git a/nptl/Makefile b/nptl/Makefile
index aaca0a4..9c3ffb8 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -22,7 +22,8 @@ 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)
@@ -132,7 +133,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 \
+ 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 34e4b46..9b049ed 100644
--- a/nptl/Versions
+++ b/nptl/Versions
@@ -269,6 +269,21 @@ libpthread {
GLIBC_2.22 {
}
+ GLIBC_2.23 {
+ 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/__thrd_err_map.h b/nptl/__thrd_err_map.h
new file mode 100644
index 0000000..4a5496b
--- /dev/null
+++ b/nptl/__thrd_err_map.h
@@ -0,0 +1,43 @@
+/* Copyright (C) 2015 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 <threads.h>
+#include <errno.h>
+
+/* Maps pthread error codes with thrd error codes.
+ Defined as inline because it's a common function used
+ by most of threads.h functions, so we avoid code duplication
+ with a small inline function. */
+
+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;
+ }
+}
diff --git a/nptl/call_once.c b/nptl/call_once.c
new file mode 100644
index 0000000..78e8002
--- /dev/null
+++ b/nptl/call_once.c
@@ -0,0 +1,29 @@
+/* Copyright (C) 2015 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/>. */
+
+/* Call function func exactly once, even if invoked from several
+ threads. However, all calls must be made with the same flag object. */
+
+#include <threads.h>
+#include "__thrd_err_map.h"
+#include "pthreadP.h"
+
+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..68466ee
--- /dev/null
+++ b/nptl/cnd_broadcast.c
@@ -0,0 +1,30 @@
+/* Copyright (C) 2015 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/>. */
+
+/* Unblock all threads currently waiting on condition
+ variable pointed to by cond. */
+
+#include <threads.h>
+#include "__thrd_err_map.h"
+#include "pthreadP.h"
+
+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..0b53754
--- /dev/null
+++ b/nptl/cnd_destroy.c
@@ -0,0 +1,29 @@
+/* Copyright (C) 2015 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/>. */
+
+/* Destroy condition variable pointed to by cond
+ and free all of its resources. */
+
+#include <threads.h>
+#include "__thrd_err_map.h"
+#include "pthreadP.h"
+
+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..49da9d4
--- /dev/null
+++ b/nptl/cnd_init.c
@@ -0,0 +1,29 @@
+/* Copyright (C) 2015 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/>. */
+
+/* Initialize new condition variable pointed by cond. */
+
+#include <threads.h>
+#include "__thrd_err_map.h"
+#include "pthreadP.h"
+
+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..cac92af
--- /dev/null
+++ b/nptl/cnd_signal.c
@@ -0,0 +1,30 @@
+/* Copyright (C) 2015 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/>. */
+
+/* Unblock one thread that currently waits on condition
+ variable pointed to by cond. */
+
+#include <threads.h>
+#include "__thrd_err_map.h"
+#include "pthreadP.h"
+
+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..fc098c5
--- /dev/null
+++ b/nptl/cnd_timedwait.c
@@ -0,0 +1,33 @@
+/* Copyright (C) 2015 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/>. */
+
+/* Block current thread on the condition variable until
+ condition variable pointed on by cond is signalled
+ or time pointed by time_point is reached. */
+
+#include <threads.h>
+#include "__thrd_err_map.h"
+#include "pthreadP.h"
+
+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..17dd134
--- /dev/null
+++ b/nptl/cnd_wait.c
@@ -0,0 +1,31 @@
+/* Copyright (C) 2015 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/>. */
+
+/* Block current thread on the condition variable
+ pointed to by cond. */
+
+#include <threads.h>
+#include "__thrd_err_map.h"
+#include "pthreadP.h"
+
+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/mtx_destroy.c b/nptl/mtx_destroy.c
new file mode 100644
index 0000000..54108f4
--- /dev/null
+++ b/nptl/mtx_destroy.c
@@ -0,0 +1,28 @@
+/* Copyright (C) 2015 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/>. */
+
+/* Destroy the mutex object pointed by mutex. */
+
+#include <threads.h>
+#include "__thrd_err_map.h"
+#include "pthreadP.h"
+
+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..f8ea0f7
--- /dev/null
+++ b/nptl/mtx_init.c
@@ -0,0 +1,54 @@
+/* Copyright (C) 2015 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/>. */
+
+/* Creates a new mutex object with type __type. If successful
+ new object is pointed by __mutex. */
+
+#include <threads.h>
+#include "__thrd_err_map.h"
+#include "pthreadP.h"
+
+int
+mtx_init (mtx_t *mutex, int type)
+{
+ pthread_mutexattr_t config;
+ int pthd_type;
+ int err_code;
+
+ /* Initialize config */
+ __pthread_mutexattr_init (&config);
+
+ /* Match types for mutex creation */
+ switch (type)
+ {
+ case mtx_plain | mtx_recursive:
+ case mtx_timed | mtx_recursive:
+ pthd_type = PTHREAD_MUTEX_RECURSIVE;
+ break;
+ case mtx_plain:
+ case mtx_timed: /* No difference between both in standard */
+ default:
+ pthd_type = PTHREAD_MUTEX_DEFAULT;
+ break;
+ }
+
+ /* Set type of mutex */
+ __pthread_mutexattr_settype (&config, pthd_type);
+ /* Initialize mutex with config */
+ err_code = __pthread_mutex_init ((pthread_mutex_t *) mutex, &config);
+ return __thrd_err_map (err_code);
+}
diff --git a/nptl/mtx_lock.c b/nptl/mtx_lock.c
new file mode 100644
index 0000000..04a73fa
--- /dev/null
+++ b/nptl/mtx_lock.c
@@ -0,0 +1,31 @@
+/* Copyright (C) 2015 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/>. */
+
+/* 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. */
+
+#include <threads.h>
+#include "__thrd_err_map.h"
+#include "pthreadP.h"
+
+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..34046f9
--- /dev/null
+++ b/nptl/mtx_timedlock.c
@@ -0,0 +1,35 @@
+/* Copyright (C) 2015 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/>. */
+
+/* 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. */
+
+#include <threads.h>
+#include <time.h>
+#include "__thrd_err_map.h"
+#include "pthreadP.h"
+
+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..99b6508
--- /dev/null
+++ b/nptl/mtx_trylock.c
@@ -0,0 +1,31 @@
+/* Copyright (C) 2015 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/>. */
+
+/* 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. */
+
+#include <threads.h>
+#include "__thrd_err_map.h"
+#include "pthreadP.h"
+
+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..bc95229
--- /dev/null
+++ b/nptl/mtx_unlock.c
@@ -0,0 +1,31 @@
+/* Copyright (C) 2015 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/>. */
+
+/* Unlock the mutex pointed to by mutex, what can lead to
+ awaking other threads waiting on this mutex. */
+
+#include <threads.h>
+#include "__thrd_err_map.h"
+#include "pthreadP.h"
+
+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/thrd_create.c b/nptl/thrd_create.c
new file mode 100644
index 0000000..06aa195
--- /dev/null
+++ b/nptl/thrd_create.c
@@ -0,0 +1,32 @@
+/* Copyright (C) 2015 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/>. */
+
+/* Create a new thread executing the function __func. Arguments to __func
+ are passed through __arg. If succesful, __thr is set to new
+ thread identifier. */
+
+#include <threads.h>
+#include "__thrd_err_map.h"
+#include "pthreadP.h"
+
+int
+thrd_create (thrd_t *thr, thrd_start_t func, void *arg)
+{
+ int err_code = __pthread_create_2_1 (thr, NULL, (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..a9ed93b
--- /dev/null
+++ b/nptl/thrd_current.c
@@ -0,0 +1,28 @@
+/* Copyright (C) 2015 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/>. */
+
+/* Return current thread identifier. */
+
+#include <threads.h>
+#include "__thrd_err_map.h"
+#include "pthreadP.h"
+
+thrd_t
+thrd_current ()
+{
+ return __pthread_self ();
+}
diff --git a/nptl/thrd_detach.c b/nptl/thrd_detach.c
new file mode 100644
index 0000000..4a8ede2
--- /dev/null
+++ b/nptl/thrd_detach.c
@@ -0,0 +1,32 @@
+/* Copyright (C) 2015 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/>. */
+
+/* Detache the thread identified by __thr from the current environment.
+ That means we cannot join or wait for __thr to finish it's execution. */
+
+#include <threads.h>
+#include "__thrd_err_map.h"
+#include "pthreadP.h"
+
+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..2aebd37
--- /dev/null
+++ b/nptl/thrd_equal.c
@@ -0,0 +1,28 @@
+/* Copyright (C) 2015 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/>. */
+
+/* Check if __lhs and __rhs point to the same thread. */
+
+#include <threads.h>
+#include "__thrd_err_map.h"
+#include "pthreadP.h"
+
+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..60f58a1
--- /dev/null
+++ b/nptl/thrd_exit.c
@@ -0,0 +1,34 @@
+/* Copyright (C) 2015 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/>. */
+
+/* Terminate current thread execution, cleaning up any thread local
+ storage and freeing resources. Returns the value specified in __res. */
+
+#include <threads.h>
+#include <stdint.h>
+#include "__thrd_err_map.h"
+#include "pthreadP.h"
+
+_Noreturn void
+thrd_exit (int res)
+{
+ /* We need to cast an int to void pointer */
+ uintptr_t aux_pointer;
+
+ aux_pointer = res;
+ __pthread_exit ((void*) aux_pointer);
+}
diff --git a/nptl/thrd_join.c b/nptl/thrd_join.c
new file mode 100644
index 0000000..5eb71c6
--- /dev/null
+++ b/nptl/thrd_join.c
@@ -0,0 +1,48 @@
+/* Copyright (C) 2015 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/>. */
+
+/* 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. */
+
+#include <threads.h>
+#include "__thrd_err_map.h"
+#include "pthreadP.h"
+
+int
+thrd_join (thrd_t thr, int *res)
+{
+ int err_code;
+ uintptr_t aux_p;
+
+ /* We have to cast the pointer res to a void pointer so the
+ pthread function can modify it. In case we don't want
+ to store the value returned, we have to send a NULL
+ pointer to pthread_join, instead of the stack value
+ where the pointer is currently stored. */
+
+ if (res != NULL)
+ {
+ err_code = __pthread_join (thr,(void*) &aux_p);
+ *res = (int)aux_p;
+
+ }else{
+ err_code = __pthread_join (thr, NULL);
+ }
+
+ return __thrd_err_map (err_code);
+}
diff --git a/nptl/thrd_sleep.c b/nptl/thrd_sleep.c
new file mode 100644
index 0000000..1cd3659
--- /dev/null
+++ b/nptl/thrd_sleep.c
@@ -0,0 +1,34 @@
+/* Copyright (C) 2015 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/>. */
+
+/* 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. */
+
+#include <threads.h>
+#include <time.h>
+
+int
+thrd_sleep (const struct timespec* time_point,
+ struct timespec* remaining)
+{
+
+ /* Returns 0 if success, -1 if interrupted and other if error */
+ return __nanosleep (time_point, remaining);
+}
diff --git a/nptl/thrd_yield.c b/nptl/thrd_yield.c
new file mode 100644
index 0000000..0d4e5ab
--- /dev/null
+++ b/nptl/thrd_yield.c
@@ -0,0 +1,29 @@
+/* Copyright (C) 2015 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/>. */
+
+/* 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. */
+
+#include <threads.h>
+#include "__thrd_err_map.h"
+
+void
+thrd_yield ()
+{
+ __sched_yield ();
+}
diff --git a/nptl/tss_create.c b/nptl/tss_create.c
new file mode 100644
index 0000000..e7ffd14
--- /dev/null
+++ b/nptl/tss_create.c
@@ -0,0 +1,32 @@
+/* Copyright (C) 2015 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/>. */
+
+/* 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. */
+
+#include <threads.h>
+#include "__thrd_err_map.h"
+#include "pthreadP.h"
+
+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..0558bba
--- /dev/null
+++ b/nptl/tss_delete.c
@@ -0,0 +1,30 @@
+/* Copyright (C) 2015 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/>. */
+
+/* Destroys the thread-specific storage identified by
+ tss_id. However, the destructor is not called until
+ thrd_exit is called. */
+
+#include <threads.h>
+#include "__thrd_err_map.h"
+#include "pthreadP.h"
+
+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..aacd2a4
--- /dev/null
+++ b/nptl/tss_get.c
@@ -0,0 +1,30 @@
+/* Copyright (C) 2015 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/>. */
+
+/* Return the value held in thread-specific storage for
+ the current thread identified by tss_id. */
+
+#include <threads.h>
+#include "__thrd_err_map.h"
+#include "pthreadP.h"
+
+void *
+tss_get (tss_t tss_id)
+{
+ /* Returns NULL if not successful or the pointer if success */
+ return __pthread_getspecific (tss_id);
+}
diff --git a/nptl/tss_set.c b/nptl/tss_set.c
new file mode 100644
index 0000000..9680341
--- /dev/null
+++ b/nptl/tss_set.c
@@ -0,0 +1,30 @@
+/* Copyright (C) 2015 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/>. */
+
+/* Sets the value of the thread-specific storage identified
+ by tss_id for the current thread to val. */
+
+#include <threads.h>
+#include "__thrd_err_map.h"
+#include "pthreadP.h"
+
+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/nacl/libpthread.abilist b/sysdeps/nacl/libpthread.abilist
index 6c5e70d..910b90d 100644
--- a/sysdeps/nacl/libpthread.abilist
+++ b/sysdeps/nacl/libpthread.abilist
@@ -174,3 +174,30 @@ GLIBC_2.22
sem_trywait F
sem_unlink F
sem_wait F
+GLIBC_2.23
+ GLIBC_2.23 A
+ call_once F
+ cnd_broadcast F
+ cnd_destroy F
+ cnd_init F
+ cnd_signal F
+ cnd_timedwait F
+ cnd_wait F
+ mtx_destroy F
+ mtx_init F
+ mtx_lock F
+ mtx_timedlock F
+ mtx_trylock F
+ mtx_unlock F
+ thrd_create F
+ thrd_current F
+ thrd_detach F
+ thrd_equal F
+ thrd_exit F
+ thrd_join F
+ thrd_sleep F
+ thrd_yield F
+ tss_create F
+ tss_delete F
+ tss_get F
+ tss_set F
diff --git a/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist b/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist
index 5520312..f61d121 100644
--- a/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist
@@ -226,3 +226,30 @@ GLIBC_2.18
GLIBC_2.18 A
pthread_getattr_default_np F
pthread_setattr_default_np F
+GLIBC_2.23
+ GLIBC_2.23 A
+ call_once F
+ cnd_broadcast F
+ cnd_destroy F
+ cnd_init F
+ cnd_signal F
+ cnd_timedwait F
+ cnd_wait F
+ mtx_destroy F
+ mtx_init F
+ mtx_lock F
+ mtx_timedlock F
+ mtx_trylock F
+ mtx_unlock F
+ thrd_create F
+ thrd_current F
+ thrd_detach F
+ thrd_equal F
+ thrd_exit F
+ thrd_join F
+ thrd_sleep F
+ thrd_yield F
+ tss_create F
+ tss_delete F
+ tss_get F
+ tss_set F
diff --git a/sysdeps/unix/sysv/linux/alpha/libpthread.abilist b/sysdeps/unix/sysv/linux/alpha/libpthread.abilist
index 4c75b17..ffeca6f 100644
--- a/sysdeps/unix/sysv/linux/alpha/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/alpha/libpthread.abilist
@@ -226,6 +226,33 @@ GLIBC_2.2.3
GLIBC_2.2.6
GLIBC_2.2.6 A
__nanosleep F
+GLIBC_2.23
+ GLIBC_2.23 A
+ call_once F
+ cnd_broadcast F
+ cnd_destroy F
+ cnd_init F
+ cnd_signal F
+ cnd_timedwait F
+ cnd_wait F
+ mtx_destroy F
+ mtx_init F
+ mtx_lock F
+ mtx_timedlock F
+ mtx_trylock F
+ mtx_unlock F
+ thrd_create F
+ thrd_current F
+ thrd_detach F
+ thrd_equal F
+ thrd_exit F
+ thrd_join F
+ thrd_sleep F
+ thrd_yield F
+ tss_create F
+ tss_delete F
+ tss_get F
+ tss_set F
GLIBC_2.3.2
GLIBC_2.3.2 A
pthread_cond_broadcast F
diff --git a/sysdeps/unix/sysv/linux/arm/libpthread.abilist b/sysdeps/unix/sysv/linux/arm/libpthread.abilist
index ac46302..4f67b2d 100644
--- a/sysdeps/unix/sysv/linux/arm/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/arm/libpthread.abilist
@@ -12,6 +12,33 @@ GLIBC_2.18
GLIBC_2.18 A
pthread_getattr_default_np F
pthread_setattr_default_np F
+GLIBC_2.23
+ GLIBC_2.23 A
+ call_once F
+ cnd_broadcast F
+ cnd_destroy F
+ cnd_init F
+ cnd_signal F
+ cnd_timedwait F
+ cnd_wait F
+ mtx_destroy F
+ mtx_init F
+ mtx_lock F
+ mtx_timedlock F
+ mtx_trylock F
+ mtx_unlock F
+ thrd_create F
+ thrd_current F
+ thrd_detach F
+ thrd_equal F
+ thrd_exit F
+ thrd_join F
+ thrd_sleep F
+ thrd_yield F
+ tss_create F
+ tss_delete F
+ tss_get F
+ tss_set F
GLIBC_2.4
GLIBC_2.4 A
_IO_flockfile F
diff --git a/sysdeps/unix/sysv/linux/hppa/libpthread.abilist b/sysdeps/unix/sysv/linux/hppa/libpthread.abilist
index 6613c09..69f9823 100644
--- a/sysdeps/unix/sysv/linux/hppa/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/hppa/libpthread.abilist
@@ -210,6 +210,33 @@ GLIBC_2.2.3
GLIBC_2.2.6
GLIBC_2.2.6 A
__nanosleep F
+GLIBC_2.23
+ GLIBC_2.23 A
+ call_once F
+ cnd_broadcast F
+ cnd_destroy F
+ cnd_init F
+ cnd_signal F
+ cnd_timedwait F
+ cnd_wait F
+ mtx_destroy F
+ mtx_init F
+ mtx_lock F
+ mtx_timedlock F
+ mtx_trylock F
+ mtx_unlock F
+ thrd_create F
+ thrd_current F
+ thrd_detach F
+ thrd_equal F
+ thrd_exit F
+ thrd_join F
+ thrd_sleep F
+ thrd_yield F
+ tss_create F
+ tss_delete F
+ tss_get F
+ tss_set F
GLIBC_2.3.2
GLIBC_2.3.2 A
pthread_cond_broadcast F
diff --git a/sysdeps/unix/sysv/linux/i386/libpthread.abilist b/sysdeps/unix/sysv/linux/i386/libpthread.abilist
index 865364e..187ba9a 100644
--- a/sysdeps/unix/sysv/linux/i386/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/i386/libpthread.abilist
@@ -226,6 +226,33 @@ GLIBC_2.2.3
GLIBC_2.2.6
GLIBC_2.2.6 A
__nanosleep F
+GLIBC_2.23
+ GLIBC_2.23 A
+ call_once F
+ cnd_broadcast F
+ cnd_destroy F
+ cnd_init F
+ cnd_signal F
+ cnd_timedwait F
+ cnd_wait F
+ mtx_destroy F
+ mtx_init F
+ mtx_lock F
+ mtx_timedlock F
+ mtx_trylock F
+ mtx_unlock F
+ thrd_create F
+ thrd_current F
+ thrd_detach F
+ thrd_equal F
+ thrd_exit F
+ thrd_join F
+ thrd_sleep F
+ thrd_yield F
+ tss_create F
+ tss_delete F
+ tss_get F
+ tss_set F
GLIBC_2.3.2
GLIBC_2.3.2 A
pthread_cond_broadcast F
diff --git a/sysdeps/unix/sysv/linux/ia64/libpthread.abilist b/sysdeps/unix/sysv/linux/ia64/libpthread.abilist
index a84c113..b0727a9 100644
--- a/sysdeps/unix/sysv/linux/ia64/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/ia64/libpthread.abilist
@@ -210,6 +210,33 @@ GLIBC_2.2.3
GLIBC_2.2.6
GLIBC_2.2.6 A
__nanosleep F
+GLIBC_2.23
+ GLIBC_2.23 A
+ call_once F
+ cnd_broadcast F
+ cnd_destroy F
+ cnd_init F
+ cnd_signal F
+ cnd_timedwait F
+ cnd_wait F
+ mtx_destroy F
+ mtx_init F
+ mtx_lock F
+ mtx_timedlock F
+ mtx_trylock F
+ mtx_unlock F
+ thrd_create F
+ thrd_current F
+ thrd_detach F
+ thrd_equal F
+ thrd_exit F
+ thrd_join F
+ thrd_sleep F
+ thrd_yield F
+ tss_create F
+ tss_delete F
+ tss_get F
+ tss_set F
GLIBC_2.3.2
GLIBC_2.3.2 A
pthread_cond_broadcast F
diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/libpthread.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/libpthread.abilist
index ac46302..4f67b2d 100644
--- a/sysdeps/unix/sysv/linux/m68k/coldfire/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/m68k/coldfire/libpthread.abilist
@@ -12,6 +12,33 @@ GLIBC_2.18
GLIBC_2.18 A
pthread_getattr_default_np F
pthread_setattr_default_np F
+GLIBC_2.23
+ GLIBC_2.23 A
+ call_once F
+ cnd_broadcast F
+ cnd_destroy F
+ cnd_init F
+ cnd_signal F
+ cnd_timedwait F
+ cnd_wait F
+ mtx_destroy F
+ mtx_init F
+ mtx_lock F
+ mtx_timedlock F
+ mtx_trylock F
+ mtx_unlock F
+ thrd_create F
+ thrd_current F
+ thrd_detach F
+ thrd_equal F
+ thrd_exit F
+ thrd_join F
+ thrd_sleep F
+ thrd_yield F
+ tss_create F
+ tss_delete F
+ tss_get F
+ tss_set F
GLIBC_2.4
GLIBC_2.4 A
_IO_flockfile F
diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/libpthread.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/libpthread.abilist
index 865364e..187ba9a 100644
--- a/sysdeps/unix/sysv/linux/m68k/m680x0/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/m68k/m680x0/libpthread.abilist
@@ -226,6 +226,33 @@ GLIBC_2.2.3
GLIBC_2.2.6
GLIBC_2.2.6 A
__nanosleep F
+GLIBC_2.23
+ GLIBC_2.23 A
+ call_once F
+ cnd_broadcast F
+ cnd_destroy F
+ cnd_init F
+ cnd_signal F
+ cnd_timedwait F
+ cnd_wait F
+ mtx_destroy F
+ mtx_init F
+ mtx_lock F
+ mtx_timedlock F
+ mtx_trylock F
+ mtx_unlock F
+ thrd_create F
+ thrd_current F
+ thrd_detach F
+ thrd_equal F
+ thrd_exit F
+ thrd_join F
+ thrd_sleep F
+ thrd_yield F
+ tss_create F
+ tss_delete F
+ tss_get F
+ tss_set F
GLIBC_2.3.2
GLIBC_2.3.2 A
pthread_cond_broadcast F
diff --git a/sysdeps/unix/sysv/linux/microblaze/libpthread.abilist b/sysdeps/unix/sysv/linux/microblaze/libpthread.abilist
index f25407d..1986907 100644
--- a/sysdeps/unix/sysv/linux/microblaze/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/microblaze/libpthread.abilist
@@ -224,3 +224,30 @@ GLIBC_2.18
wait F
waitpid F
write F
+GLIBC_2.23
+ GLIBC_2.23 A
+ call_once F
+ cnd_broadcast F
+ cnd_destroy F
+ cnd_init F
+ cnd_signal F
+ cnd_timedwait F
+ cnd_wait F
+ mtx_destroy F
+ mtx_init F
+ mtx_lock F
+ mtx_timedlock F
+ mtx_trylock F
+ mtx_unlock F
+ thrd_create F
+ thrd_current F
+ thrd_detach F
+ thrd_equal F
+ thrd_exit F
+ thrd_join F
+ thrd_sleep F
+ thrd_yield F
+ tss_create F
+ tss_delete F
+ tss_get F
+ tss_set F
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/libpthread.abilist b/sysdeps/unix/sysv/linux/mips/mips32/libpthread.abilist
index 00ad3ab..cff979b 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips32/libpthread.abilist
@@ -220,6 +220,33 @@ GLIBC_2.2.3
GLIBC_2.2.6
GLIBC_2.2.6 A
__nanosleep F
+GLIBC_2.23
+ GLIBC_2.23 A
+ call_once F
+ cnd_broadcast F
+ cnd_destroy F
+ cnd_init F
+ cnd_signal F
+ cnd_timedwait F
+ cnd_wait F
+ mtx_destroy F
+ mtx_init F
+ mtx_lock F
+ mtx_timedlock F
+ mtx_trylock F
+ mtx_unlock F
+ thrd_create F
+ thrd_current F
+ thrd_detach F
+ thrd_equal F
+ thrd_exit F
+ thrd_join F
+ thrd_sleep F
+ thrd_yield F
+ tss_create F
+ tss_delete F
+ tss_get F
+ tss_set F
GLIBC_2.3.2
GLIBC_2.3.2 A
pthread_cond_broadcast F
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/libpthread.abilist b/sysdeps/unix/sysv/linux/mips/mips64/libpthread.abilist
index fdcd0cc..d001ebd 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips64/libpthread.abilist
@@ -220,6 +220,33 @@ GLIBC_2.2.3
GLIBC_2.2.6
GLIBC_2.2.6 A
__nanosleep F
+GLIBC_2.23
+ GLIBC_2.23 A
+ call_once F
+ cnd_broadcast F
+ cnd_destroy F
+ cnd_init F
+ cnd_signal F
+ cnd_timedwait F
+ cnd_wait F
+ mtx_destroy F
+ mtx_init F
+ mtx_lock F
+ mtx_timedlock F
+ mtx_trylock F
+ mtx_unlock F
+ thrd_create F
+ thrd_current F
+ thrd_detach F
+ thrd_equal F
+ thrd_exit F
+ thrd_join F
+ thrd_sleep F
+ thrd_yield F
+ tss_create F
+ tss_delete F
+ tss_get F
+ tss_set F
GLIBC_2.3.2
GLIBC_2.3.2 A
pthread_cond_broadcast F
diff --git a/sysdeps/unix/sysv/linux/nios2/libpthread.abilist b/sysdeps/unix/sysv/linux/nios2/libpthread.abilist
index ca203c7..72f001b 100644
--- a/sysdeps/unix/sysv/linux/nios2/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/nios2/libpthread.abilist
@@ -222,3 +222,30 @@ GLIBC_2.21
wait F
waitpid F
write F
+GLIBC_2.23
+ GLIBC_2.23 A
+ call_once F
+ cnd_broadcast F
+ cnd_destroy F
+ cnd_init F
+ cnd_signal F
+ cnd_timedwait F
+ cnd_wait F
+ mtx_destroy F
+ mtx_init F
+ mtx_lock F
+ mtx_timedlock F
+ mtx_trylock F
+ mtx_unlock F
+ thrd_create F
+ thrd_current F
+ thrd_detach F
+ thrd_equal F
+ thrd_exit F
+ thrd_join F
+ thrd_sleep F
+ thrd_yield F
+ tss_create F
+ tss_delete F
+ tss_get F
+ tss_set F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/libpthread.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/libpthread.abilist
index c8a2a04..b33fea7 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/libpthread.abilist
@@ -226,6 +226,33 @@ GLIBC_2.2.3
GLIBC_2.2.6
GLIBC_2.2.6 A
__nanosleep F
+GLIBC_2.23
+ GLIBC_2.23 A
+ call_once F
+ cnd_broadcast F
+ cnd_destroy F
+ cnd_init F
+ cnd_signal F
+ cnd_timedwait F
+ cnd_wait F
+ mtx_destroy F
+ mtx_init F
+ mtx_lock F
+ mtx_timedlock F
+ mtx_trylock F
+ mtx_unlock F
+ thrd_create F
+ thrd_current F
+ thrd_detach F
+ thrd_equal F
+ thrd_exit F
+ thrd_join F
+ thrd_sleep F
+ thrd_yield F
+ tss_create F
+ tss_delete F
+ tss_get F
+ tss_set F
GLIBC_2.3.2
GLIBC_2.3.2 A
pthread_cond_broadcast F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/libpthread-le.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libpthread-le.abilist
index 5520312..f61d121 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/libpthread-le.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libpthread-le.abilist
@@ -226,3 +226,30 @@ GLIBC_2.18
GLIBC_2.18 A
pthread_getattr_default_np F
pthread_setattr_default_np F
+GLIBC_2.23
+ GLIBC_2.23 A
+ call_once F
+ cnd_broadcast F
+ cnd_destroy F
+ cnd_init F
+ cnd_signal F
+ cnd_timedwait F
+ cnd_wait F
+ mtx_destroy F
+ mtx_init F
+ mtx_lock F
+ mtx_timedlock F
+ mtx_trylock F
+ mtx_unlock F
+ thrd_create F
+ thrd_current F
+ thrd_detach F
+ thrd_equal F
+ thrd_exit F
+ thrd_join F
+ thrd_sleep F
+ thrd_yield F
+ tss_create F
+ tss_delete F
+ tss_get F
+ tss_set F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/libpthread.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libpthread.abilist
index 0faa1b8..7c0cd80 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libpthread.abilist
@@ -12,6 +12,33 @@ GLIBC_2.18
GLIBC_2.18 A
pthread_getattr_default_np F
pthread_setattr_default_np F
+GLIBC_2.23
+ GLIBC_2.23 A
+ call_once F
+ cnd_broadcast F
+ cnd_destroy F
+ cnd_init F
+ cnd_signal F
+ cnd_timedwait F
+ cnd_wait F
+ mtx_destroy F
+ mtx_init F
+ mtx_lock F
+ mtx_timedlock F
+ mtx_trylock F
+ mtx_unlock F
+ thrd_create F
+ thrd_current F
+ thrd_detach F
+ thrd_equal F
+ thrd_exit F
+ thrd_join F
+ thrd_sleep F
+ thrd_yield F
+ tss_create F
+ tss_delete F
+ tss_get F
+ tss_set F
GLIBC_2.3
GLIBC_2.3 A
_IO_flockfile F
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/libpthread.abilist b/sysdeps/unix/sysv/linux/s390/s390-32/libpthread.abilist
index 699de01..5ffe640 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/libpthread.abilist
@@ -230,6 +230,33 @@ GLIBC_2.2.3
GLIBC_2.2.6
GLIBC_2.2.6 A
__nanosleep F
+GLIBC_2.23
+ GLIBC_2.23 A
+ call_once F
+ cnd_broadcast F
+ cnd_destroy F
+ cnd_init F
+ cnd_signal F
+ cnd_timedwait F
+ cnd_wait F
+ mtx_destroy F
+ mtx_init F
+ mtx_lock F
+ mtx_timedlock F
+ mtx_trylock F
+ mtx_unlock F
+ thrd_create F
+ thrd_current F
+ thrd_detach F
+ thrd_equal F
+ thrd_exit F
+ thrd_join F
+ thrd_sleep F
+ thrd_yield F
+ tss_create F
+ tss_delete F
+ tss_get F
+ tss_set F
GLIBC_2.3.2
GLIBC_2.3.2 A
pthread_cond_broadcast F
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/libpthread.abilist b/sysdeps/unix/sysv/linux/s390/s390-64/libpthread.abilist
index 51a8a7f..4dd6108 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/libpthread.abilist
@@ -214,6 +214,33 @@ GLIBC_2.2.3
GLIBC_2.2.6
GLIBC_2.2.6 A
__nanosleep F
+GLIBC_2.23
+ GLIBC_2.23 A
+ call_once F
+ cnd_broadcast F
+ cnd_destroy F
+ cnd_init F
+ cnd_signal F
+ cnd_timedwait F
+ cnd_wait F
+ mtx_destroy F
+ mtx_init F
+ mtx_lock F
+ mtx_timedlock F
+ mtx_trylock F
+ mtx_unlock F
+ thrd_create F
+ thrd_current F
+ thrd_detach F
+ thrd_equal F
+ thrd_exit F
+ thrd_join F
+ thrd_sleep F
+ thrd_yield F
+ tss_create F
+ tss_delete F
+ tss_get F
+ tss_set F
GLIBC_2.3.2
GLIBC_2.3.2 A
pthread_cond_broadcast F
diff --git a/sysdeps/unix/sysv/linux/sh/libpthread.abilist b/sysdeps/unix/sysv/linux/sh/libpthread.abilist
index 6613c09..69f9823 100644
--- a/sysdeps/unix/sysv/linux/sh/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/sh/libpthread.abilist
@@ -210,6 +210,33 @@ GLIBC_2.2.3
GLIBC_2.2.6
GLIBC_2.2.6 A
__nanosleep F
+GLIBC_2.23
+ GLIBC_2.23 A
+ call_once F
+ cnd_broadcast F
+ cnd_destroy F
+ cnd_init F
+ cnd_signal F
+ cnd_timedwait F
+ cnd_wait F
+ mtx_destroy F
+ mtx_init F
+ mtx_lock F
+ mtx_timedlock F
+ mtx_trylock F
+ mtx_unlock F
+ thrd_create F
+ thrd_current F
+ thrd_detach F
+ thrd_equal F
+ thrd_exit F
+ thrd_join F
+ thrd_sleep F
+ thrd_yield F
+ tss_create F
+ tss_delete F
+ tss_get F
+ tss_set F
GLIBC_2.3.2
GLIBC_2.3.2 A
pthread_cond_broadcast F
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/libpthread.abilist b/sysdeps/unix/sysv/linux/sparc/sparc32/libpthread.abilist
index 4c75b17..ffeca6f 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/libpthread.abilist
@@ -226,6 +226,33 @@ GLIBC_2.2.3
GLIBC_2.2.6
GLIBC_2.2.6 A
__nanosleep F
+GLIBC_2.23
+ GLIBC_2.23 A
+ call_once F
+ cnd_broadcast F
+ cnd_destroy F
+ cnd_init F
+ cnd_signal F
+ cnd_timedwait F
+ cnd_wait F
+ mtx_destroy F
+ mtx_init F
+ mtx_lock F
+ mtx_timedlock F
+ mtx_trylock F
+ mtx_unlock F
+ thrd_create F
+ thrd_current F
+ thrd_detach F
+ thrd_equal F
+ thrd_exit F
+ thrd_join F
+ thrd_sleep F
+ thrd_yield F
+ tss_create F
+ tss_delete F
+ tss_get F
+ tss_set F
GLIBC_2.3.2
GLIBC_2.3.2 A
pthread_cond_broadcast F
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/libpthread.abilist b/sysdeps/unix/sysv/linux/sparc/sparc64/libpthread.abilist
index a84c113..b0727a9 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/libpthread.abilist
@@ -210,6 +210,33 @@ GLIBC_2.2.3
GLIBC_2.2.6
GLIBC_2.2.6 A
__nanosleep F
+GLIBC_2.23
+ GLIBC_2.23 A
+ call_once F
+ cnd_broadcast F
+ cnd_destroy F
+ cnd_init F
+ cnd_signal F
+ cnd_timedwait F
+ cnd_wait F
+ mtx_destroy F
+ mtx_init F
+ mtx_lock F
+ mtx_timedlock F
+ mtx_trylock F
+ mtx_unlock F
+ thrd_create F
+ thrd_current F
+ thrd_detach F
+ thrd_equal F
+ thrd_exit F
+ thrd_join F
+ thrd_sleep F
+ thrd_yield F
+ tss_create F
+ tss_delete F
+ tss_get F
+ tss_set F
GLIBC_2.3.2
GLIBC_2.3.2 A
pthread_cond_broadcast F
diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/libpthread.abilist b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/libpthread.abilist
index f3c2600..056832f 100644
--- a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/libpthread.abilist
@@ -226,3 +226,30 @@ GLIBC_2.18
GLIBC_2.18 A
pthread_getattr_default_np F
pthread_setattr_default_np F
+GLIBC_2.23
+ GLIBC_2.23 A
+ call_once F
+ cnd_broadcast F
+ cnd_destroy F
+ cnd_init F
+ cnd_signal F
+ cnd_timedwait F
+ cnd_wait F
+ mtx_destroy F
+ mtx_init F
+ mtx_lock F
+ mtx_timedlock F
+ mtx_trylock F
+ mtx_unlock F
+ thrd_create F
+ thrd_current F
+ thrd_detach F
+ thrd_equal F
+ thrd_exit F
+ thrd_join F
+ thrd_sleep F
+ thrd_yield F
+ tss_create F
+ tss_delete F
+ tss_get F
+ 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 f3c2600..056832f 100644
--- a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/libpthread.abilist
@@ -226,3 +226,30 @@ GLIBC_2.18
GLIBC_2.18 A
pthread_getattr_default_np F
pthread_setattr_default_np F
+GLIBC_2.23
+ GLIBC_2.23 A
+ call_once F
+ cnd_broadcast F
+ cnd_destroy F
+ cnd_init F
+ cnd_signal F
+ cnd_timedwait F
+ cnd_wait F
+ mtx_destroy F
+ mtx_init F
+ mtx_lock F
+ mtx_timedlock F
+ mtx_trylock F
+ mtx_unlock F
+ thrd_create F
+ thrd_current F
+ thrd_detach F
+ thrd_equal F
+ thrd_exit F
+ thrd_join F
+ thrd_sleep F
+ thrd_yield F
+ tss_create F
+ tss_delete F
+ tss_get F
+ tss_set F
diff --git a/sysdeps/unix/sysv/linux/tile/tilepro/libpthread.abilist b/sysdeps/unix/sysv/linux/tile/tilepro/libpthread.abilist
index f3c2600..056832f 100644
--- a/sysdeps/unix/sysv/linux/tile/tilepro/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/tile/tilepro/libpthread.abilist
@@ -226,3 +226,30 @@ GLIBC_2.18
GLIBC_2.18 A
pthread_getattr_default_np F
pthread_setattr_default_np F
+GLIBC_2.23
+ GLIBC_2.23 A
+ call_once F
+ cnd_broadcast F
+ cnd_destroy F
+ cnd_init F
+ cnd_signal F
+ cnd_timedwait F
+ cnd_wait F
+ mtx_destroy F
+ mtx_init F
+ mtx_lock F
+ mtx_timedlock F
+ mtx_trylock F
+ mtx_unlock F
+ thrd_create F
+ thrd_current F
+ thrd_detach F
+ thrd_equal F
+ thrd_exit F
+ thrd_join F
+ thrd_sleep F
+ thrd_yield F
+ tss_create F
+ tss_delete F
+ tss_get F
+ 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 1b5192b..a642dc1 100644
--- a/sysdeps/unix/sysv/linux/x86_64/64/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/x86_64/64/libpthread.abilist
@@ -208,6 +208,33 @@ GLIBC_2.2.5
GLIBC_2.2.6
GLIBC_2.2.6 A
__nanosleep F
+GLIBC_2.23
+ GLIBC_2.23 A
+ call_once F
+ cnd_broadcast F
+ cnd_destroy F
+ cnd_init F
+ cnd_signal F
+ cnd_timedwait F
+ cnd_wait F
+ mtx_destroy F
+ mtx_init F
+ mtx_lock F
+ mtx_timedlock F
+ mtx_trylock F
+ mtx_unlock F
+ thrd_create F
+ thrd_current F
+ thrd_detach F
+ thrd_equal F
+ thrd_exit F
+ thrd_join F
+ thrd_sleep F
+ thrd_yield F
+ tss_create F
+ tss_delete F
+ tss_get F
+ tss_set F
GLIBC_2.3.2
GLIBC_2.3.2 A
pthread_cond_broadcast F
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/libpthread.abilist b/sysdeps/unix/sysv/linux/x86_64/x32/libpthread.abilist
index 328f69a..aa81c8f7 100644
--- a/sysdeps/unix/sysv/linux/x86_64/x32/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/x86_64/x32/libpthread.abilist
@@ -226,3 +226,30 @@ GLIBC_2.18
GLIBC_2.18 A
pthread_getattr_default_np F
pthread_setattr_default_np F
+GLIBC_2.23
+ GLIBC_2.23 A
+ call_once F
+ cnd_broadcast F
+ cnd_destroy F
+ cnd_init F
+ cnd_signal F
+ cnd_timedwait F
+ cnd_wait F
+ mtx_destroy F
+ mtx_init F
+ mtx_lock F
+ mtx_timedlock F
+ mtx_trylock F
+ mtx_unlock F
+ thrd_create F
+ thrd_current F
+ thrd_detach F
+ thrd_equal F
+ thrd_exit F
+ thrd_join F
+ thrd_sleep F
+ thrd_yield F
+ tss_create F
+ tss_delete F
+ tss_get F
+ tss_set F
--
2.1.0