aboutsummaryrefslogtreecommitdiff
path: root/nptl
AgeCommit message (Collapse)Author
2021-04-23nptl: Remove __h_errno_location from libpthreadFlorian Weimer
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 Weimer
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 Weimer
The symbol was moved using scripts/move-symbol-to-libc.py.
2021-04-23nptl: Move pthread_spin_lock into libcFlorian Weimer
The symbol was moved using scripts/move-symbol-to-libc.py.
2021-04-23nptl: Move pthread_spin_init, Move pthread_spin_unlock into libcFlorian Weimer
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 Weimer
The symbol was moved using scripts/move-symbol-to-libc.py.
2021-04-23nptl: Move pthread_condattr_setpshared into libcFlorian Weimer
The symbol was moved using scripts/move-symbol-to-libc.py.
2021-04-23nptl: Move pthread_condattr_setclock into libcFlorian Weimer
The symbol was moved using scripts/move-symbol-to-libc.py.
2021-04-23nptl: Move pthread_condattr_getpshared into libcFlorian Weimer
The symbol was moved using scripts/move-symbol-to-libc.py.
2021-04-23nptl: Move pthread_condattr_getclock into libcFlorian Weimer
The symbol was moved using scripts/move-symbol-to-libc.py.
2021-04-23nptl: Move pthread_mutexattr_settype, __pthread_mutexattr_settype into libcFlorian Weimer
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 Weimer
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 Weimer
The symbol was moved using scripts/move-symbol-to-libc.py.
2021-04-23nptl: Move pthread_mutexattr_setprotocol into libcFlorian Weimer
The symbol was moved using scripts/move-symbol-to-libc.py.
2021-04-23nptl: Move pthread_mutexattr_setprioceiling into libcFlorian Weimer
The symbol was moved using scripts/move-symbol-to-libc.py.
2021-04-23nptl: Move pthread_mutexattr_init, __pthread_mutexattr_init into libcFlorian Weimer
__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 Weimer
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 Weimer
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 Weimer
The symbol was moved using scripts/move-symbol-to-libc.py.
2021-04-23nptl: Move pthread_mutexattr_getprotocol into libcFlorian Weimer
The symbol was moved using scripts/move-symbol-to-libc.py.
2021-04-23nptl: Move pthread_mutexattr_getprioceiling into libcFlorian Weimer
The symbol was moved using scripts/move-symbol-to-libc.py.
2021-04-23nptl: Move pthread_mutexattr_destroy into libcFlorian Weimer
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 Weimer
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 Weimer
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 Weimer
The symbol was moved using scripts/move-symbol-to-libc.py.
2021-04-23nptl: Move pthread_mutex_getprioceiling into libcFlorian Weimer
The symbol was moved using scripts/move-symbol-to-libc.py.
2021-04-22nptl: Do not build nptl/tst-pthread-gdb-attach as PIEFlorian Weimer
2021-04-22nptl: Move pthread_kill_other_threads_np compatibility symbol into libcFlorian Weimer
And stop including the function for new architectures.
2021-04-22nptl: Move pthread_atfork compatibility symbol to libcFlorian Weimer
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 Weimer
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 Weimer
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 Weimer
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 Weimer
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 Weimer
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 Weimer
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>
2021-04-21nptl: Move internal symbol __mutex_aconf into libcFlorian Weimer
This is in preparation of moving the mutex code into libc. __pthread_tunables_init is now called via __pthread_early_init. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2021-04-21nptl: Move the internal thread priority protection symbols into libcFlorian Weimer
This is a prerequisite for moving the mutex implementation. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2021-04-21nptl: Move rwlock functions with forwarders into libcFlorian Weimer
The forwarders were only used internally, so new symbol versions are needed. All symbols are moved at once because the forwarders are no-ops if libpthread is not loaded, leading to inconsistencies in case of a partial migration. The symbols __pthread_rwlock_rdlock, __pthread_rwlock_unlock, __pthread_rwlock_wrlock, pthread_rwlock_rdlock, pthread_rwlock_unlock, pthread_rwlock_wrlock have been moved using scripts/move-symbol-to-libc.py. The __ symbol variants are turned into compat symbols, which is why they do not receive a GLIBC_2.34 version.
2021-04-21nptl: Move pthread_key_delete into libc.Florian Weimer
The symbol was moved using scripts/move-symbol-to-libc.py. tss_delete (still in libpthread) uses the __pthread_key_create alias, so that is now exported under GLIBC_PRIVATE.
2021-04-21nptl: Move pthread_setspecific, __pthread_setspecific into libcFlorian Weimer
The symbols have been moved using scripts/move-symbol-to-libc.py.
2021-04-21nptl: Move pthread_getspecific, __pthread_getspecific into libcFlorian Weimer
The symbols have been moved using scripts/move-symbol-to-libc.py.
2021-04-21nptl: Move pthread_key_create, __pthread_key_create into libcFlorian Weimer
The symbols have been moved using scripts/move-symbol-to-libc.py.
2021-04-21nptl: Move part of TCB initialization from libpthread to __tls_init_tpFlorian Weimer
This initalization should only happen once for the main thread's TCB. At present, auditors can achieve this by not linking against libpthread. If libpthread becomes part of libc, doing this initialization in libc would happen for every audit namespace, or too late (if it happens from the main libc only). That's why moving this code into ld.so seems the right thing to do, right after the TCB initialization. For !__ASSUME_SET_ROBUST_LIST ports, this also moves the symbol __set_robust_list_avail into ld.so, as __nptl_set_robust_list_avail. It also turned into a proper boolean flag. Inline the __pthread_initialize_pids function because it seems no longer useful as a separate function. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2021-04-21nptl: Invoke the set_robust_list system call directly in forkFlorian Weimer
This removes one of the pthread forwarder functions. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2021-04-21nptl: Move pthread_setcanceltype into libcFlorian Weimer
No new symbol version is required because there was a forwarder. The symbol has been moved using scripts/move-symbol-to-libc.py. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2021-04-21nptl: Move pthread_setcancelstate into libcFlorian Weimer
No new symbol version is required because there was a forwarder. The symbol has been moved using scripts/move-symbol-to-libc.py. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2021-04-21nptl: Move pthread_exit into libcFlorian Weimer
The pthread_exit symbol was moved using scripts/move-symbol-to-libc.py. No new symbol version is needed because there was a forwarder. The new tests nptl/tst-pthread_exit-nothreads and nptl/tst-pthread_exit-nothreads-static exercise the scenario that pthread_exit is called without libpthread having been linked in. This is not possible for the generic code, so these tests do not live in sysdeps/pthread for now. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2021-04-21nptl: Move __nptl_deallocate_tsd into libcFlorian Weimer
This prepares moving pthread_exit, and later the pthread_key_create infrastructure. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2021-04-21nptl: Move __pthread_keys global variable into libcFlorian Weimer
This prepares moving pthread_exit, and later the pthread_key_create infrastructure. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2021-04-21nptl: Move internal __nptl_nthreads variable into libcFlorian Weimer
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>