aboutsummaryrefslogtreecommitdiff
path: root/nptl
AgeCommit message (Collapse)AuthorFilesLines
2021-05-03nptl: Move mtx_unlock into libcFlorian Weimer1-1/+2
The symbol was moved using scripts/move-symbol-to-libc.py. __pthread_mutex_unlock@GLIBC_2.34 is not removed in this commit because it is still used from nptl/nptl-init.c. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
2021-05-03nptl: Move mtx_trylock into libcFlorian Weimer2-4/+7
The symbol was moved using scripts/move-symbol-to-libc.py. The __pthread_mutex_trylock@@GLIBC_2.34 symbol version is no longer needed because the call is now internal to libc, so remove it with this commit. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
2021-05-03nptl: Move mtx_timedlock into libcFlorian Weimer2-5/+7
The symbol was moved using scripts/move-symbol-to-libc.py. The __pthread_mutex_timedlock@@GLIBC_PRIVATE export is no longer needed, so it is removed with this commit. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
2021-05-03nptl: Move mtx_lock into libcFlorian Weimer1-1/+2
The symbol was moved using scripts/move-symbol-to-libc.py. __pthread_mutex_lock@GLIBC_2.34 is not removed in this commit because it is still used from nptl/nptl-init.c. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
2021-05-03nptl: Move mtx_init into libcFlorian Weimer5-11/+17
The symbol was moved using scripts/move-symbol-to-libc.py. The calls to __pthread_mutex_init, __pthread_mutexattr_init, __pthread_mutexattr_settype are now private and no longer need to be exported. This allows the removal of the newly added GLIBC_2.34 symbol versions for those functions. Also clean up some weak declarations in <libc-lockP.h> for these functions. They are not needed and potentially incorrect for static linking of mtx_init. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
2021-05-03nptl: Move mtx_destroy into libcFlorian Weimer2-5/+6
The symbol was moved using scripts/move-symbol-to-libc.py. The __pthread_mutex_destroy@@GLIBC_2.34 symbol is no longer neded because this commit makes __pthread_mutex_destroy@GLIBC_2.0 a compatibility symbol, so remove the new symbol version. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
2021-05-03nptl: Move cnd_wait into libcFlorian Weimer2-4/+2
The symbol was moved using scripts/move-symbol-to-libc.py. The __pthread_cond_wait@@GLIBC_PRIVATE symbol is no longer neded, so remove that as well. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
2021-05-03nptl: Move cnd_timedwait into libcFlorian Weimer2-6/+8
The symbol was moved using scripts/move-symbol-to-libc.py. The __pthread_cond_timedwait@@GLIBC_PRIVATE symbol is no longer neded, so remove that as well. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
2021-05-03nptl: Move cnd_signal into libcFlorian Weimer2-4/+5
The symbol was moved using scripts/move-symbol-to-libc.py. The __pthread_cond_signal@@GLIBC_PRIVATE symbol is no longer neded, so remove that as well. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
2021-05-03nptl: Move cnd_init into libcFlorian Weimer1-2/+2
The symbol was moved using scripts/move-symbol-to-libc.py. The __pthread_cond_init@@GLIBC_PRIVATE symbol is no longer neded, so remove that as well. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
2021-05-03nptl: Move cnd_destroy into libcFlorian Weimer1-2/+2
The symbol was moved using scripts/move-symbol-to-libc.py. The __pthread_cond_destroy@@GLIBC_PRIVATE symbol is no longer neded, so remove that as well. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
2021-05-03nptl: Move cnd_broadcast into libcFlorian Weimer2-4/+5
The symbol was moved using scripts/move-symbol-to-libc.py. The __pthread_cond_broadcast@@GLIBC_PRIVATE symbol is no longer neded, so remove that as well. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
2021-05-03nptl: Move call_once into libcFlorian Weimer2-3/+5
The symbol was moved using scripts/move-symbol-to-libc.py. This change also turns __pthread_once into a compatibility symbol because after the call_once move, an internal call to __pthread_once can be used. This an adjustment to __libc_once: Outside libc (e.g., in nscd), it has to call pthread_once. With __pthread_once as a compatibility symbol, it is no longer to add a new GLIBC_2.34 version after the move from libpthread, and this commit removes the new __pthread_once@@GLIBC_2.34 version. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
2021-04-27Pass a valid pointer to pthread_setspecific to avoid GCC 11 warning.Martin Sebor2-6/+11
2021-04-27Add __attribute_access_none to disable GCC warnings [BZ #27714]Martin Sebor2-0/+44
GCC 11 warns when a pointer to an uninitialized object is passed to a function that takes a const-qualified argument. This is done on the assumption that most such functions read from the object. For the rare case of a function that doesn't, GCC 11 extends attribute access to add a new mode called none. POSIX pthread_setspecific() is one such rare function that takes a const void* argument but that doesn't read from the object it points to. To suppress the -Wmaybe-uninitialized issued by GCC 11 when the address of an uninitialized object is passed to it (e.g., the result of malloc()), this change #defines __attr_access_none in cdefs.h and uses the macro on the function in sysdeps/htl/pthread.h and sysdeps/nptl/pthread.h.
2021-04-23nptl: Remove __h_errno_location from libpthreadFlorian Weimer3-36/+0
The existing definition in libc will be used instead. The symbol was moved (that is, removed) using scripts/move-symbol-to-libc.py.
2021-04-23nptl: Remove __res_state from libpthreadFlorian Weimer3-28/+0
The existing definition in libc will be used instead. The symbol was moved (that is, removed) using scripts/move-symbol-to-libc.py.
2021-04-23nptl: Move pthread_spin_trylock into libcFlorian Weimer3-3/+12
The symbol was moved using scripts/move-symbol-to-libc.py.
2021-04-23nptl: Move pthread_spin_lock into libcFlorian Weimer3-3/+10
The symbol was moved using scripts/move-symbol-to-libc.py.
2021-04-23nptl: Move pthread_spin_init, Move pthread_spin_unlock into libcFlorian Weimer4-6/+22
For some architectures, the two functions are aliased, so these symbols need to be moved at the same time. The symbols were moved using scripts/move-symbol-to-libc.py.
2021-04-23nptl: Move pthread_spin_destroy into libcFlorian Weimer3-4/+12
The symbol was moved using scripts/move-symbol-to-libc.py.
2021-04-23nptl: Move pthread_condattr_setpshared into libcFlorian Weimer3-3/+12
The symbol was moved using scripts/move-symbol-to-libc.py.
2021-04-23nptl: Move pthread_condattr_setclock into libcFlorian Weimer3-3/+11
The symbol was moved using scripts/move-symbol-to-libc.py.
2021-04-23nptl: Move pthread_condattr_getpshared into libcFlorian Weimer3-4/+12
The symbol was moved using scripts/move-symbol-to-libc.py.
2021-04-23nptl: Move pthread_condattr_getclock into libcFlorian Weimer3-4/+13
The symbol was moved using scripts/move-symbol-to-libc.py.
2021-04-23nptl: Move pthread_mutexattr_settype, __pthread_mutexattr_settype into libcFlorian Weimer4-10/+24
And pthread_mutexattr_setkind_np as a compatibility symbol. __pthread_mutexattr_settype is used in mtx_init from libpthread, so this commit adds a GLIBC_2.34 symbol version for it. The symbols were moved using scripts/move-symbol-to-libc.py.
2021-04-23nptl: Move pthread_mutexattr_setrobust into libcFlorian Weimer4-6/+24
And pthread_mutexattr_getrobust_np as a compat symbol. The symbols were moved using scripts/move-symbol-to-libc.py.
2021-04-23nptl: Move pthread_mutexattr_setpshared into libcFlorian Weimer3-4/+12
The symbol was moved using scripts/move-symbol-to-libc.py.
2021-04-23nptl: Move pthread_mutexattr_setprotocol into libcFlorian Weimer3-4/+12
The symbol was moved using scripts/move-symbol-to-libc.py.
2021-04-23nptl: Move pthread_mutexattr_setprioceiling into libcFlorian Weimer3-4/+12
The symbol was moved using scripts/move-symbol-to-libc.py.
2021-04-23nptl: Move pthread_mutexattr_init, __pthread_mutexattr_init into libcFlorian Weimer4-8/+18
__pthread_mutexattr_init cannot be be made a compat symbol because it is used in mtx_init, which is still in libpthread. The symbols were moved using scripts/move-symbol-to-libc.py.
2021-04-23nptl: Move pthread_mutexattr_gettype into libcFlorian Weimer3-6/+18
And pthread_mutexattr_getkind_np as a compatibility symbol. (There is no declaration in <pthread.h>, so there is no need to add an alias or a deprecation warning there.) The symbols were moved using scripts/move-symbol-to-libc.py.
2021-04-23nptl: Move pthread_mutexattr_getrobust into libcFlorian Weimer3-6/+19
And pthread_mutexattr_getrobust_np as a compat symbol. The symbols were moved using scripts/move-symbol-to-libc.py.
2021-04-23nptl: Move pthread_mutexattr_getpshared into libcFlorian Weimer3-4/+11
The symbol was moved using scripts/move-symbol-to-libc.py.
2021-04-23nptl: Move pthread_mutexattr_getprotocol into libcFlorian Weimer3-4/+12
The symbol was moved using scripts/move-symbol-to-libc.py.
2021-04-23nptl: Move pthread_mutexattr_getprioceiling into libcFlorian Weimer3-5/+13
The symbol was moved using scripts/move-symbol-to-libc.py.
2021-04-23nptl: Move pthread_mutexattr_destroy into libcFlorian Weimer3-6/+14
And __pthread_mutexattr_destroy as a compat symbol (so no GLIBC_2.34 symbol version is added for it). The symbols were moved using scripts/move-symbol-to-libc.py.
2021-04-23nptl: Move pthread_mutex_trylock, __pthread_mutex_trylock into libcFlorian Weimer4-11/+15
The symbols were moved using scripts/move-symbol-to-libc.py. __pthread_mutex_trylock is used to implement mtx_timedlock, which still resides in libpthread, so add a GLIBC_2.34 version for it, to match the existing GLIBC_2.0 version.
2021-04-23nptl: Move pthread_mutex_timedlock, pthread_mutex_clocklock to libcFlorian Weimer4-20/+53
The symbols were moved using scripts/move-symbol-to-libc.py. The symbol aliasing follows pthread_cond_timedwait et al. Missing hidden prototypes had to be added to nptl/pthreadP.h for consistency.
2021-04-23nptl: Move pthread_mutex_setprioceiling into libcFlorian Weimer3-5/+13
The symbol was moved using scripts/move-symbol-to-libc.py.
2021-04-23nptl: Move pthread_mutex_getprioceiling into libcFlorian Weimer3-4/+12
The symbol was moved using scripts/move-symbol-to-libc.py.
2021-04-22nptl: Do not build nptl/tst-pthread-gdb-attach as PIEFlorian Weimer1-0/+3
2021-04-22nptl: Move pthread_kill_other_threads_np compatibility symbol into libcFlorian Weimer3-4/+3
And stop including the function for new architectures.
2021-04-22nptl: Move pthread_atfork compatibility symbol to libcFlorian Weimer3-4/+3
The symbol was moved using scripts/move-symbol-to-libc.py. There is no new symbol version because of the compatibility symbol status. The __pthread_atfork reference in nptl/Versions was unused.
2021-04-22nptl: Check for compatible GDB in nptl/tst-pthread-gdb-attachFlorian Weimer1-2/+76
Also do not clear the subprocess environment, in case running GDB needs certain environment variables.
2021-04-21nptl: Remove remnants of the libc/libpthread forwarder interfaceFlorian Weimer5-75/+4
All previously forwarded functions are now implemented in libc. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2021-04-21nptl: Move setxid broadcast implementation into libcFlorian Weimer6-259/+284
The signal handler is exported as __nptl_setxid_sighandler, so that the libpthread initialization code can install it. This is sufficient for now because it is guarantueed to happen before the first pthread_create call.
2021-04-21nptl: Move core condition variable functions into libcFlorian Weimer13-122/+86
Onl pthread_cond_clockwait did not have a forwarder, so it needs a new symbol version. Some complications arise due to the need to supply hidden aliases, GLIBC_PRIVATE exports (for the C11 condition variable implementation that still remains in libpthread) and 64-bit time_t stubs. pthread_cond_broadcast, pthread_cond_signal, pthread_cond_timedwait, pthread_cond_wait, pthread_cond_clockwait have been moved using scripts/move-symbol-to-libc.py. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2021-04-21nptl: Move core mutex functions into libcFlorian Weimer10-49/+74
This is complicated because of a second compilation of nptl/pthread_mutex_lock.c via nptl/pthread_mutex_cond_lock.c. PTHREAD_MUTEX_VERSIONS is introduced to suppress symbol versions in that case. The symbols __pthread_mutex_lock, __pthread_mutex_unlock, __pthread_mutex_init, __pthread_mutex_destroy, pthread_mutex_lock, pthread_mutex_unlock, pthread_mutex_init, pthread_mutex_destroy have been moved using scripts/move-symbol-to-libc.py. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2021-04-21nptl: pthread_mutex_lock, pthread_mutex_unock single-threaded optimizationFlorian Weimer3-4/+39
This is optimization is similar in spirit to the SINGLE_THREAD_P check in the malloc implementation. Doing this in generic code allows us to prioritize those cases which are likely to occur in single-threaded programs (normal and recursive mutexes). Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>