diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2020-01-13 19:58:28 +0000 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2020-02-09 13:56:48 +0100 |
commit | b05de1040009d0d07a5a2e2765cffe554ffbe6ac (patch) | |
tree | 2b112a97ce7947699fac8b6df47e6db0b5196ded | |
parent | 6cefe985b869e7b33b05ce7252410474d8a6c3ad (diff) | |
download | glibc-b05de1040009d0d07a5a2e2765cffe554ffbe6ac.tar glibc-b05de1040009d0d07a5a2e2765cffe554ffbe6ac.tar.gz glibc-b05de1040009d0d07a5a2e2765cffe554ffbe6ac.tar.bz2 glibc-b05de1040009d0d07a5a2e2765cffe554ffbe6ac.zip |
C11 threads: Move implementation to sysdeps/pthread
so it gets shared by nptl and htl. Also add htl versions of thrd_current and
thrd_yield.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
-rw-r--r-- | htl/Versions | 16 | ||||
-rw-r--r-- | nptl/Makefile | 14 | ||||
-rw-r--r-- | sysdeps/htl/pthreadP.h | 2 | ||||
-rw-r--r-- | sysdeps/htl/thrd_current.c | 31 | ||||
-rw-r--r-- | sysdeps/htl/threads.h | 1 | ||||
-rw-r--r-- | sysdeps/hurd/stdc-predef.h | 63 | ||||
-rw-r--r-- | sysdeps/mach/htl/thrd_yield.c | 26 | ||||
-rw-r--r-- | sysdeps/mach/hurd/htl/pt-mutex-destroy.c | 1 | ||||
-rw-r--r-- | sysdeps/mach/hurd/htl/pt-mutex-timedlock.c | 1 | ||||
-rw-r--r-- | sysdeps/mach/hurd/i386/libc.abilist | 4 | ||||
-rw-r--r-- | sysdeps/mach/hurd/i386/libpthread.abilist | 21 | ||||
-rw-r--r-- | sysdeps/nptl/thrd_create.c | 2 | ||||
-rw-r--r-- | sysdeps/pthread/Makefile | 18 | ||||
-rw-r--r-- | sysdeps/pthread/call_once.c (renamed from nptl/call_once.c) | 0 | ||||
-rw-r--r-- | sysdeps/pthread/cnd_broadcast.c (renamed from nptl/cnd_broadcast.c) | 0 | ||||
-rw-r--r-- | sysdeps/pthread/cnd_destroy.c (renamed from nptl/cnd_destroy.c) | 0 | ||||
-rw-r--r-- | sysdeps/pthread/cnd_init.c (renamed from nptl/cnd_init.c) | 0 | ||||
-rw-r--r-- | sysdeps/pthread/cnd_signal.c (renamed from nptl/cnd_signal.c) | 0 | ||||
-rw-r--r-- | sysdeps/pthread/cnd_timedwait.c (renamed from nptl/cnd_timedwait.c) | 0 | ||||
-rw-r--r-- | sysdeps/pthread/cnd_wait.c (renamed from nptl/cnd_wait.c) | 0 | ||||
-rw-r--r-- | sysdeps/pthread/mtx_destroy.c (renamed from nptl/mtx_destroy.c) | 0 | ||||
-rw-r--r-- | sysdeps/pthread/mtx_init.c (renamed from nptl/mtx_init.c) | 0 | ||||
-rw-r--r-- | sysdeps/pthread/mtx_lock.c (renamed from nptl/mtx_lock.c) | 0 | ||||
-rw-r--r-- | sysdeps/pthread/mtx_timedlock.c (renamed from nptl/mtx_timedlock.c) | 0 | ||||
-rw-r--r-- | sysdeps/pthread/mtx_trylock.c (renamed from nptl/mtx_trylock.c) | 0 | ||||
-rw-r--r-- | sysdeps/pthread/mtx_unlock.c (renamed from nptl/mtx_unlock.c) | 0 | ||||
-rw-r--r-- | sysdeps/pthread/thrd_create.c (renamed from nptl/thrd_create.c) | 4 | ||||
-rw-r--r-- | sysdeps/pthread/thrd_detach.c (renamed from nptl/thrd_detach.c) | 0 | ||||
-rw-r--r-- | sysdeps/pthread/thrd_equal.c (renamed from nptl/thrd_equal.c) | 0 | ||||
-rw-r--r-- | sysdeps/pthread/thrd_exit.c (renamed from nptl/thrd_exit.c) | 0 | ||||
-rw-r--r-- | sysdeps/pthread/thrd_join.c (renamed from nptl/thrd_join.c) | 0 | ||||
-rw-r--r-- | sysdeps/pthread/thrd_priv.h (renamed from nptl/thrd_priv.h) | 0 | ||||
-rw-r--r-- | sysdeps/pthread/thrd_sleep.c (renamed from nptl/thrd_sleep.c) | 0 | ||||
-rw-r--r-- | sysdeps/pthread/threads.h (renamed from sysdeps/nptl/threads.h) | 0 | ||||
-rw-r--r-- | sysdeps/pthread/tss_create.c (renamed from nptl/tss_create.c) | 0 | ||||
-rw-r--r-- | sysdeps/pthread/tss_delete.c (renamed from nptl/tss_delete.c) | 0 | ||||
-rw-r--r-- | sysdeps/pthread/tss_get.c (renamed from nptl/tss_get.c) | 0 | ||||
-rw-r--r-- | sysdeps/pthread/tss_set.c (renamed from nptl/tss_set.c) | 0 | ||||
-rw-r--r-- | sysdeps/pthread/tst-call-once.c (renamed from nptl/tst-call-once.c) | 0 | ||||
-rw-r--r-- | sysdeps/pthread/tst-cnd-basic.c (renamed from nptl/tst-cnd-basic.c) | 0 | ||||
-rw-r--r-- | sysdeps/pthread/tst-cnd-broadcast.c (renamed from nptl/tst-cnd-broadcast.c) | 0 | ||||
-rw-r--r-- | sysdeps/pthread/tst-cnd-timedwait.c (renamed from nptl/tst-cnd-timedwait.c) | 0 | ||||
-rw-r--r-- | sysdeps/pthread/tst-mtx-basic.c (renamed from nptl/tst-mtx-basic.c) | 0 | ||||
-rw-r--r-- | sysdeps/pthread/tst-mtx-recursive.c (renamed from nptl/tst-mtx-recursive.c) | 0 | ||||
-rw-r--r-- | sysdeps/pthread/tst-mtx-timedlock.c (renamed from nptl/tst-mtx-timedlock.c) | 0 | ||||
-rw-r--r-- | sysdeps/pthread/tst-mtx-trylock.c (renamed from nptl/tst-mtx-trylock.c) | 0 | ||||
-rw-r--r-- | sysdeps/pthread/tst-thrd-detach.c (renamed from nptl/tst-thrd-detach.c) | 0 | ||||
-rw-r--r-- | sysdeps/pthread/tst-thrd-sleep.c (renamed from nptl/tst-thrd-sleep.c) | 0 | ||||
-rw-r--r-- | sysdeps/pthread/tst-tss-basic.c (renamed from nptl/tst-tss-basic.c) | 0 |
49 files changed, 127 insertions, 77 deletions
diff --git a/htl/Versions b/htl/Versions index f9281649a7..4f5f727753 100644 --- a/htl/Versions +++ b/htl/Versions @@ -20,6 +20,12 @@ libc { GLIBC_2.22 { __register_atfork; } + + # C11 thread symbols. + GLIBC_2.32 { + thrd_current; thrd_equal; thrd_sleep; thrd_yield; + } + GLIBC_PRIVATE { __libc_alloca_cutoff; __libc_pthread_init; @@ -136,6 +142,16 @@ libpthread { pthread_hurd_cond_wait_np; pthread_hurd_cond_timedwait_np; } + + # C11 thread symbols. + GLIBC_2.32 { + thrd_create; thrd_detach; thrd_exit; thrd_join; + mtx_init; mtx_lock; mtx_timedlock; mtx_trylock; mtx_unlock; mtx_destroy; + call_once; + cnd_broadcast; cnd_destroy; cnd_init; cnd_signal; cnd_timedwait; cnd_wait; + tss_create; tss_delete; tss_get; tss_set; + } + GLIBC_PRIVATE { __shm_directory; __pthread_threads; diff --git a/nptl/Makefile b/nptl/Makefile index ae530a5bae..f762ea26a3 100644 --- a/nptl/Makefile +++ b/nptl/Makefile @@ -22,7 +22,7 @@ subdir := nptl include ../Makeconfig -headers := pthread.h semaphore.h bits/semaphore.h threads.h \ +headers := pthread.h semaphore.h bits/semaphore.h \ bits/struct_mutex.h bits/struct_rwlock.h extra-libs := libpthread @@ -30,8 +30,7 @@ extra-libs-others := $(extra-libs) routines = alloca_cutoff forward libc-lowlevellock libc-cancellation \ libc-cleanup libc_pthread_init libc_multiple_threads \ - register-atfork pthread_atfork pthread_self thrd_current \ - thrd_equal thrd_sleep thrd_yield pthread_equal \ + register-atfork pthread_atfork pthread_self pthread_equal \ pthread_attr_destroy pthread_attr_init pthread_attr_getdetachstate \ pthread_attr_setdetachstate pthread_attr_getinheritsched \ pthread_attr_setinheritsched pthread_attr_getschedparam \ @@ -141,11 +140,7 @@ libpthread-routines = nptl-init nptlfreeres vars events version pt-interp \ pthread_mutex_setprioceiling \ pthread_setname pthread_getname \ pthread_setattr_default_np pthread_getattr_default_np \ - thrd_create thrd_detach thrd_exit thrd_join \ - mtx_destroy mtx_init mtx_lock mtx_timedlock \ - mtx_trylock mtx_unlock call_once cnd_broadcast \ - cnd_destroy cnd_init cnd_signal cnd_timedwait cnd_wait \ - tss_create tss_delete tss_get tss_set pthread_mutex_conf \ + pthread_mutex_conf \ libpthread-compat # pthread_setuid pthread_seteuid pthread_setreuid \ # pthread_setresuid \ @@ -319,9 +314,6 @@ tests = tst-attr1 tst-attr2 tst-attr3 tst-default-attr \ tst-robust-fork tst-create-detached tst-memstream \ tst-thread-exit-clobber tst-minstack-cancel tst-minstack-exit \ tst-minstack-throw \ - tst-cnd-basic tst-mtx-trylock tst-cnd-broadcast \ - tst-cnd-timedwait tst-thrd-detach tst-mtx-basic tst-thrd-sleep \ - tst-mtx-recursive tst-tss-basic tst-call-once tst-mtx-timedlock \ tst-rwlock-pwn \ tst-rwlock-tryrdlock-stall tst-rwlock-trywrlock-stall \ tst-unwind-thread diff --git a/sysdeps/htl/pthreadP.h b/sysdeps/htl/pthreadP.h index fc8c9bc591..fd1e697e39 100644 --- a/sysdeps/htl/pthreadP.h +++ b/sysdeps/htl/pthreadP.h @@ -91,6 +91,8 @@ hidden_proto (__pthread_key_create) hidden_proto (__pthread_getspecific) hidden_proto (__pthread_setspecific) hidden_proto (__pthread_mutex_init) +hidden_proto (__pthread_mutex_destroy) +hidden_proto (__pthread_mutex_timedlock) #endif #define ASSERT_TYPE_SIZE(type, size) \ diff --git a/sysdeps/htl/thrd_current.c b/sysdeps/htl/thrd_current.c new file mode 100644 index 0000000000..6304cd755f --- /dev/null +++ b/sysdeps/htl/thrd_current.c @@ -0,0 +1,31 @@ +/* C11 threads current thread implementation. + Copyright (C) 2020 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 + <https://www.gnu.org/licenses/>. */ + +#include "thrd_priv.h" + +#pragma weak __pthread_self +#pragma weak __pthread_threads + +thrd_t +thrd_current (void) +{ + if (__pthread_threads) + return (thrd_t) __pthread_self (); + + return (thrd_t) 0; +} diff --git a/sysdeps/htl/threads.h b/sysdeps/htl/threads.h deleted file mode 100644 index 3c04fbcc79..0000000000 --- a/sysdeps/htl/threads.h +++ /dev/null @@ -1 +0,0 @@ -#error "HTL does not implement ISO C threads" diff --git a/sysdeps/hurd/stdc-predef.h b/sysdeps/hurd/stdc-predef.h deleted file mode 100644 index a7bb5f7c5f..0000000000 --- a/sysdeps/hurd/stdc-predef.h +++ /dev/null @@ -1,63 +0,0 @@ -/* Copyright (C) 2018-2020 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 - <https://www.gnu.org/licenses/>. */ - -#ifndef _STDC_PREDEF_H -#define _STDC_PREDEF_H 1 - -/* This header is separate from features.h so that the compiler can - include it implicitly at the start of every compilation. It must - not itself include <features.h> or any other header that includes - <features.h> because the implicit include comes before any feature - test macros that may be defined in a source file before it first - explicitly includes a system header. GCC knows the name of this - header in order to preinclude it. */ - -/* glibc's intent is to support the IEC 559 math functionality, real - and complex. If the GCC (4.9 and later) predefined macros - specifying compiler intent are available, use them to determine - whether the overall intent is to support these features; otherwise, - presume an older compiler has intent to support these features and - define these macros by default. */ - -#ifdef __GCC_IEC_559 -# if __GCC_IEC_559 > 0 -# define __STDC_IEC_559__ 1 -# endif -#else -# define __STDC_IEC_559__ 1 -#endif - -#ifdef __GCC_IEC_559_COMPLEX -# if __GCC_IEC_559_COMPLEX > 0 -# define __STDC_IEC_559_COMPLEX__ 1 -# endif -#else -# define __STDC_IEC_559_COMPLEX__ 1 -#endif - -/* wchar_t uses Unicode 10.0.0. Version 10.0 of the Unicode Standard is - synchronized with ISO/IEC 10646:2017, fifth edition, plus - the following additions from Amendment 1 to the fifth edition: - - 56 emoji characters - - 285 hentaigana - - 3 additional Zanabazar Square characters */ -#define __STDC_ISO_10646__ 201706L - -/* We do not support C11 <threads.h>. */ -#define __STDC_NO_THREADS__ 1 - -#endif diff --git a/sysdeps/mach/htl/thrd_yield.c b/sysdeps/mach/htl/thrd_yield.c new file mode 100644 index 0000000000..48e17e1c0a --- /dev/null +++ b/sysdeps/mach/htl/thrd_yield.c @@ -0,0 +1,26 @@ +/* sched_yield -- yield the processor. Mach version. + Copyright (C) 2020 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 + <https://www.gnu.org/licenses/>. */ + +#include <mach.h> +#include "thrd_priv.h" + +void +thrd_yield (void) +{ + (void) __swtch (); +} diff --git a/sysdeps/mach/hurd/htl/pt-mutex-destroy.c b/sysdeps/mach/hurd/htl/pt-mutex-destroy.c index a8a0adc03f..a5bfaddcb2 100644 --- a/sysdeps/mach/hurd/htl/pt-mutex-destroy.c +++ b/sysdeps/mach/hurd/htl/pt-mutex-destroy.c @@ -35,3 +35,4 @@ __pthread_mutex_destroy (pthread_mutex_t *mtxp) } strong_alias (__pthread_mutex_destroy, pthread_mutex_destroy) +hidden_def (__pthread_mutex_destroy) diff --git a/sysdeps/mach/hurd/htl/pt-mutex-timedlock.c b/sysdeps/mach/hurd/htl/pt-mutex-timedlock.c index e83bc57875..3aa7d798b2 100644 --- a/sysdeps/mach/hurd/htl/pt-mutex-timedlock.c +++ b/sysdeps/mach/hurd/htl/pt-mutex-timedlock.c @@ -77,3 +77,4 @@ __pthread_mutex_timedlock (pthread_mutex_t *mtxp, const struct timespec *tsp) return ret; } strong_alias (__pthread_mutex_timedlock, pthread_mutex_timedlock) +hidden_def (__pthread_mutex_timedlock) diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist index 7c2cb2b05a..dd0d3c7317 100644 --- a/sysdeps/mach/hurd/i386/libc.abilist +++ b/sysdeps/mach/hurd/i386/libc.abilist @@ -2181,6 +2181,10 @@ GLIBC_2.3.4 setsourcefilter F GLIBC_2.3.4 xdr_quad_t F GLIBC_2.3.4 xdr_u_quad_t F GLIBC_2.30 twalk_r F +GLIBC_2.32 thrd_current F +GLIBC_2.32 thrd_equal F +GLIBC_2.32 thrd_sleep F +GLIBC_2.32 thrd_yield F GLIBC_2.4 __confstr_chk F GLIBC_2.4 __fgets_chk F GLIBC_2.4 __fgets_unlocked_chk F diff --git a/sysdeps/mach/hurd/i386/libpthread.abilist b/sysdeps/mach/hurd/i386/libpthread.abilist index 14ef22e3db..4a5e1fb750 100644 --- a/sysdeps/mach/hurd/i386/libpthread.abilist +++ b/sysdeps/mach/hurd/i386/libpthread.abilist @@ -142,3 +142,24 @@ GLIBC_2.2.6 __errno_location F GLIBC_2.2.6 __h_errno_location F GLIBC_2.21 pthread_hurd_cond_timedwait_np F GLIBC_2.21 pthread_hurd_cond_wait_np F +GLIBC_2.32 call_once F +GLIBC_2.32 cnd_broadcast F +GLIBC_2.32 cnd_destroy F +GLIBC_2.32 cnd_init F +GLIBC_2.32 cnd_signal F +GLIBC_2.32 cnd_timedwait F +GLIBC_2.32 cnd_wait F +GLIBC_2.32 mtx_destroy F +GLIBC_2.32 mtx_init F +GLIBC_2.32 mtx_lock F +GLIBC_2.32 mtx_timedlock F +GLIBC_2.32 mtx_trylock F +GLIBC_2.32 mtx_unlock F +GLIBC_2.32 thrd_create F +GLIBC_2.32 thrd_detach F +GLIBC_2.32 thrd_exit F +GLIBC_2.32 thrd_join F +GLIBC_2.32 tss_create F +GLIBC_2.32 tss_delete F +GLIBC_2.32 tss_get F +GLIBC_2.32 tss_set F diff --git a/sysdeps/nptl/thrd_create.c b/sysdeps/nptl/thrd_create.c new file mode 100644 index 0000000000..596a7ba588 --- /dev/null +++ b/sysdeps/nptl/thrd_create.c @@ -0,0 +1,2 @@ +#define __pthread_create __pthread_create_2_1 +#include <sysdeps/pthread/thrd_create.c> diff --git a/sysdeps/pthread/Makefile b/sysdeps/pthread/Makefile index 7f9eadd0e2..889f10d8b1 100644 --- a/sysdeps/pthread/Makefile +++ b/sysdeps/pthread/Makefile @@ -25,3 +25,21 @@ $(objpfx)tst-timer: $(objpfx)librt.a $(static-thread-library) endif endif + +ifneq (,$(filter $(subdir),htl nptl)) +headers += threads.h + +routines += thrd_current thrd_equal thrd_sleep thrd_yield + +libpthread-routines += thrd_create thrd_detach thrd_exit thrd_join \ + call_once \ + mtx_destroy mtx_init mtx_lock mtx_timedlock \ + mtx_trylock mtx_unlock \ + cnd_broadcast \ + cnd_destroy cnd_init cnd_signal cnd_timedwait cnd_wait \ + tss_create tss_delete tss_get tss_set + +tests += tst-cnd-basic tst-mtx-trylock tst-cnd-broadcast \ + tst-cnd-timedwait tst-thrd-detach tst-mtx-basic tst-thrd-sleep \ + tst-mtx-recursive tst-tss-basic tst-call-once tst-mtx-timedlock +endif diff --git a/nptl/call_once.c b/sysdeps/pthread/call_once.c index 25e2964c76..25e2964c76 100644 --- a/nptl/call_once.c +++ b/sysdeps/pthread/call_once.c diff --git a/nptl/cnd_broadcast.c b/sysdeps/pthread/cnd_broadcast.c index 66e0fce0c6..66e0fce0c6 100644 --- a/nptl/cnd_broadcast.c +++ b/sysdeps/pthread/cnd_broadcast.c diff --git a/nptl/cnd_destroy.c b/sysdeps/pthread/cnd_destroy.c index 763e91cb0f..763e91cb0f 100644 --- a/nptl/cnd_destroy.c +++ b/sysdeps/pthread/cnd_destroy.c diff --git a/nptl/cnd_init.c b/sysdeps/pthread/cnd_init.c index e8d7d68a2c..e8d7d68a2c 100644 --- a/nptl/cnd_init.c +++ b/sysdeps/pthread/cnd_init.c diff --git a/nptl/cnd_signal.c b/sysdeps/pthread/cnd_signal.c index 27155ffc1b..27155ffc1b 100644 --- a/nptl/cnd_signal.c +++ b/sysdeps/pthread/cnd_signal.c diff --git a/nptl/cnd_timedwait.c b/sysdeps/pthread/cnd_timedwait.c index c7f5309cf7..c7f5309cf7 100644 --- a/nptl/cnd_timedwait.c +++ b/sysdeps/pthread/cnd_timedwait.c diff --git a/nptl/cnd_wait.c b/sysdeps/pthread/cnd_wait.c index 8070ca7c6a..8070ca7c6a 100644 --- a/nptl/cnd_wait.c +++ b/sysdeps/pthread/cnd_wait.c diff --git a/nptl/mtx_destroy.c b/sysdeps/pthread/mtx_destroy.c index 9ac324c8f8..9ac324c8f8 100644 --- a/nptl/mtx_destroy.c +++ b/sysdeps/pthread/mtx_destroy.c diff --git a/nptl/mtx_init.c b/sysdeps/pthread/mtx_init.c index 436a03673e..436a03673e 100644 --- a/nptl/mtx_init.c +++ b/sysdeps/pthread/mtx_init.c diff --git a/nptl/mtx_lock.c b/sysdeps/pthread/mtx_lock.c index cf1632b3f2..cf1632b3f2 100644 --- a/nptl/mtx_lock.c +++ b/sysdeps/pthread/mtx_lock.c diff --git a/nptl/mtx_timedlock.c b/sysdeps/pthread/mtx_timedlock.c index d55cf99d11..d55cf99d11 100644 --- a/nptl/mtx_timedlock.c +++ b/sysdeps/pthread/mtx_timedlock.c diff --git a/nptl/mtx_trylock.c b/sysdeps/pthread/mtx_trylock.c index 7ffcbc1e93..7ffcbc1e93 100644 --- a/nptl/mtx_trylock.c +++ b/sysdeps/pthread/mtx_trylock.c diff --git a/nptl/mtx_unlock.c b/sysdeps/pthread/mtx_unlock.c index ebb0cd633b..ebb0cd633b 100644 --- a/nptl/mtx_unlock.c +++ b/sysdeps/pthread/mtx_unlock.c diff --git a/nptl/thrd_create.c b/sysdeps/pthread/thrd_create.c index 8423ffc805..4c47f053af 100644 --- a/nptl/thrd_create.c +++ b/sysdeps/pthread/thrd_create.c @@ -24,7 +24,7 @@ thrd_create (thrd_t *thr, thrd_start_t func, void *arg) _Static_assert (sizeof (thrd_t) == sizeof (pthread_t), "sizeof (thrd_t) != sizeof (pthread_t)"); - int err_code = __pthread_create_2_1 (thr, ATTR_C11_THREAD, - (void* (*) (void*))func, arg); + int err_code = __pthread_create (thr, ATTR_C11_THREAD, + (void* (*) (void*))func, arg); return thrd_err_map (err_code); } diff --git a/nptl/thrd_detach.c b/sysdeps/pthread/thrd_detach.c index 8ddc2e8477..8ddc2e8477 100644 --- a/nptl/thrd_detach.c +++ b/sysdeps/pthread/thrd_detach.c diff --git a/nptl/thrd_equal.c b/sysdeps/pthread/thrd_equal.c index 41211d3ef9..41211d3ef9 100644 --- a/nptl/thrd_equal.c +++ b/sysdeps/pthread/thrd_equal.c diff --git a/nptl/thrd_exit.c b/sysdeps/pthread/thrd_exit.c index d9ad207baa..d9ad207baa 100644 --- a/nptl/thrd_exit.c +++ b/sysdeps/pthread/thrd_exit.c diff --git a/nptl/thrd_join.c b/sysdeps/pthread/thrd_join.c index 0c482959d5..0c482959d5 100644 --- a/nptl/thrd_join.c +++ b/sysdeps/pthread/thrd_join.c diff --git a/nptl/thrd_priv.h b/sysdeps/pthread/thrd_priv.h index d22ad6f632..d22ad6f632 100644 --- a/nptl/thrd_priv.h +++ b/sysdeps/pthread/thrd_priv.h diff --git a/nptl/thrd_sleep.c b/sysdeps/pthread/thrd_sleep.c index c9805d5fd1..c9805d5fd1 100644 --- a/nptl/thrd_sleep.c +++ b/sysdeps/pthread/thrd_sleep.c diff --git a/sysdeps/nptl/threads.h b/sysdeps/pthread/threads.h index 0ac489b4a1..0ac489b4a1 100644 --- a/sysdeps/nptl/threads.h +++ b/sysdeps/pthread/threads.h diff --git a/nptl/tss_create.c b/sysdeps/pthread/tss_create.c index 4e170dd4fc..4e170dd4fc 100644 --- a/nptl/tss_create.c +++ b/sysdeps/pthread/tss_create.c diff --git a/nptl/tss_delete.c b/sysdeps/pthread/tss_delete.c index 38570ea100..38570ea100 100644 --- a/nptl/tss_delete.c +++ b/sysdeps/pthread/tss_delete.c diff --git a/nptl/tss_get.c b/sysdeps/pthread/tss_get.c index f8300b7b84..f8300b7b84 100644 --- a/nptl/tss_get.c +++ b/sysdeps/pthread/tss_get.c diff --git a/nptl/tss_set.c b/sysdeps/pthread/tss_set.c index b21b6c2647..b21b6c2647 100644 --- a/nptl/tss_set.c +++ b/sysdeps/pthread/tss_set.c diff --git a/nptl/tst-call-once.c b/sysdeps/pthread/tst-call-once.c index c198233e8d..c198233e8d 100644 --- a/nptl/tst-call-once.c +++ b/sysdeps/pthread/tst-call-once.c diff --git a/nptl/tst-cnd-basic.c b/sysdeps/pthread/tst-cnd-basic.c index 041762ae35..041762ae35 100644 --- a/nptl/tst-cnd-basic.c +++ b/sysdeps/pthread/tst-cnd-basic.c diff --git a/nptl/tst-cnd-broadcast.c b/sysdeps/pthread/tst-cnd-broadcast.c index ccc8504f6f..ccc8504f6f 100644 --- a/nptl/tst-cnd-broadcast.c +++ b/sysdeps/pthread/tst-cnd-broadcast.c diff --git a/nptl/tst-cnd-timedwait.c b/sysdeps/pthread/tst-cnd-timedwait.c index 05e3a051a5..05e3a051a5 100644 --- a/nptl/tst-cnd-timedwait.c +++ b/sysdeps/pthread/tst-cnd-timedwait.c diff --git a/nptl/tst-mtx-basic.c b/sysdeps/pthread/tst-mtx-basic.c index 1e3d809bd0..1e3d809bd0 100644 --- a/nptl/tst-mtx-basic.c +++ b/sysdeps/pthread/tst-mtx-basic.c diff --git a/nptl/tst-mtx-recursive.c b/sysdeps/pthread/tst-mtx-recursive.c index 6b471ac724..6b471ac724 100644 --- a/nptl/tst-mtx-recursive.c +++ b/sysdeps/pthread/tst-mtx-recursive.c diff --git a/nptl/tst-mtx-timedlock.c b/sysdeps/pthread/tst-mtx-timedlock.c index 21c73a3d60..21c73a3d60 100644 --- a/nptl/tst-mtx-timedlock.c +++ b/sysdeps/pthread/tst-mtx-timedlock.c diff --git a/nptl/tst-mtx-trylock.c b/sysdeps/pthread/tst-mtx-trylock.c index dcb7a5407b..dcb7a5407b 100644 --- a/nptl/tst-mtx-trylock.c +++ b/sysdeps/pthread/tst-mtx-trylock.c diff --git a/nptl/tst-thrd-detach.c b/sysdeps/pthread/tst-thrd-detach.c index 53be296f97..53be296f97 100644 --- a/nptl/tst-thrd-detach.c +++ b/sysdeps/pthread/tst-thrd-detach.c diff --git a/nptl/tst-thrd-sleep.c b/sysdeps/pthread/tst-thrd-sleep.c index 39d5fc7079..39d5fc7079 100644 --- a/nptl/tst-thrd-sleep.c +++ b/sysdeps/pthread/tst-thrd-sleep.c diff --git a/nptl/tst-tss-basic.c b/sysdeps/pthread/tst-tss-basic.c index 3b06abc5cf..3b06abc5cf 100644 --- a/nptl/tst-tss-basic.c +++ b/sysdeps/pthread/tst-tss-basic.c |