summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* aarch64: Update ILP32 abilists for glibc 2.30arm/ilp32Szabolcs Nagy2019-08-012-0/+9
| | | | | | | | | This will need to be merged with the initial ilp32 abilist commit. 2019-08-01 Szabolcs Nagy <szabolcs.nagy@arm.com> * sysdeps/unix/sysv/linux/aarch64/ilp32/libc.abilist: Update. * sysdeps/unix/sysv/linux/aarch64/ilp32/libpthread.abilist: Update.
* aarch64: Update ILP32 abilists for glibc 2.29Szabolcs Nagy2019-08-011-0/+3
| | | | | | | | This will need to be merged with the initial ilp32 abilist commit. 2019-05-09 Szabolcs Nagy <szabolcs.nagy@arm.com> * sysdeps/unix/sysv/linux/aarch64/ilp32/libc.abilist: Update.
* aarch64: Update ILP32 abilists for glibc 2.28Szabolcs Nagy2019-08-013-0/+80
| | | | | | | | | | This will need to be merged with the initial ilp32 abilist commit. 2018-08-03 Szabolcs Nagy <szabolcs.nagy@arm.com> * sysdeps/unix/sysv/linux/aarch64/ilp32/libc.abilist: Update. * sysdeps/unix/sysv/linux/aarch64/ilp32/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/aarch64/ilp32/libpthread.abilist: Likewise.
* aarch64: Ignore absolute symbols in ILP32 abilistsSzabolcs Nagy2019-08-0113-13/+0
| | | | | | | | | | | | | | | | | | | | | | This will need to be merged with the initial ilp32 abilist commit. 2018-08-03 Szabolcs Nagy <szabolcs.nagy@arm.com> * sysdeps/unix/sysv/linux/aarch64/ilp32/ld.abilist: Ignore absolute symbols. * sysdeps/unix/sysv/linux/aarch64/ilp32/libBrokenLocale.abilist: Likewise. * sysdeps/unix/sysv/linux/aarch64/ilp32/libanl.abilist: Likewise. * sysdeps/unix/sysv/linux/aarch64/ilp32/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/aarch64/ilp32/libcrypt.abilist: Likewise. * sysdeps/unix/sysv/linux/aarch64/ilp32/libdl.abilist: Likewise. * sysdeps/unix/sysv/linux/aarch64/ilp32/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/aarch64/ilp32/libnsl.abilist: Likewise. * sysdeps/unix/sysv/linux/aarch64/ilp32/libpthread.abilist: Likewise. * sysdeps/unix/sysv/linux/aarch64/ilp32/libresolv.abilist: Likewise. * sysdeps/unix/sysv/linux/aarch64/ilp32/librt.abilist: Likewise. * sysdeps/unix/sysv/linux/aarch64/ilp32/libthread_db.abilist: Likewise. * sysdeps/unix/sysv/linux/aarch64/ilp32/libutil.abilist: Likewise.
* aarch64: Fix bits/utmp.h for GCC 8Szabolcs Nagy2019-08-011-3/+6
| | | | | | | | | | The same suppression of -Wstringop-truncation warnings as in commit 7532837d7b03b3ca5b9a63d77a5bd81dd23f3d9c but for aarch64. 2018-02-21 Szabolcs Nagy <szabolcs.nagy@arm.com> * sysdeps/unix/sysv/linux/aarch64/bits/utmp.h (struct utmp): Use __attribute_nonstring__.
* aarch64: Update ILP32 abilistsSzabolcs Nagy2019-08-013-1/+334
| | | | | | | | | | | | Update libc and libm abilists with copy_file_range, mlock2, pkey_* and _FloatN related symbols. Remove pthread_self from the libpthread abilist. This will need to be merged with the initial ilp32 abilist commit. 2018-01-26 Szabolcs Nagy <szabolcs.nagy@arm.com> * sysdeps/unix/sysv/linux/aarch64/ilp32/libc.abilist: Update. * sysdeps/unix/sysv/linux/aarch64/ilp32/libm.abilist: Update. * sysdeps/unix/sysv/linux/aarch64/ilp32/libpthread.abilist: Update.
* aarch64: Fix jmp_buf-macros.h for ILP32.Szabolcs Nagy2019-08-011-1/+5
| | | | | | | | | The offset is different on ILP32 because __saved_mask is 4 byte aligned. 2017-11-28 Szabolcs Nagy <szabolcs.nagy@arm.com> * sysdeps/unix/sysv/linux/aarch64/jmp_buf-macros.h (SAVED_MASK_OFFSET): Fix for ILP32.
* aarch64: Update ILP32 abilistsSzabolcs Nagy2019-08-014-2/+219
| | | | | | | | | | | | | Update libc and libm abilists with memfd_create and new _FloatN symbols. Remove __nis_hash and __p_secstodate from libnsl and libresolv abilists. This will need to be merged with the initial ilp32 abilist commit. 2017-11-27 Szabolcs Nagy <szabolcs.nagy@arm.com> * sysdeps/unix/sysv/linux/aarch64/ilp32/libc.abilist: Update. * sysdeps/unix/sysv/linux/aarch64/ilp32/libm.abilist: Update. * sysdeps/unix/sysv/linux/aarch64/ilp32/libnsl.abilist: Update. * sysdeps/unix/sysv/linux/aarch64/ilp32/libresolv.abilist: Update.
* aarch64: Update ILP32 abilistsSzabolcs Nagy2019-08-015-9/+21
| | | | | | | | | | | | | | | | | | | | | | | | Update abilist files because a number of symbols got removed for GLIBC_2.27. ILP32 now needs separate localplt.data as well because it has no matherr PLT anymore. (Eventually this will be merged into the initial abilist commit.) 2017-09-29 Szabolcs Nagy <szabolcs.nagy@arm.com> * sysdeps/unix/sysv/linux/aarch64/ilp32/libc.abilist (__nss_group_lookup): Remove. (__nss_hosts_lookup): Remove. (__nss_passwd_lookup): Remove. * sysdeps/unix/sysv/linux/aarch64/ilp32/libm.abilist (_LIB_VERSION): Remove. (matherr): Remove. (pow10): Remove. (pow10f): Remove. (pow10l): Remove. * sysdeps/unix/sysv/linux/aarch64/ilp32/libresolv.abilist (_res_opcodes): Remove. * sysdeps/unix/sysv/linux/aarch64/ilp32/localplt.data: New file.
* aarch64: Fix ipc_perm definition for ILP32Steve Ellcey2019-08-011-0/+5
| | | | | | | | | | | | Here is another aarch64 ILP32 patch. The mode field in ipc_perm in ILP32 should be a 16 bit field, not a 32 bit one. This was out-of-sync with what the kernel had. This was causing sysvipc/test-sysvsem to fail in ILP32 mode. 2017-09-01 Yury Norov <ynorov@caviumnetworks.com> Steve Ellcey <sellcey@cavium.com> * sysdeps/unix/sysv/linux/aarch64/bits/ipc.h (ipc_perm): Ifdef and pad the mode field for ILP32.
* aarch64: Set ilp32 minimum linux version to 4.12Szabolcs Nagy2019-08-012-2/+2
| | | | | | | | | | | | Mainline linux does not support ilp32 yet, but there is support for this abi since linux v4.12 in the arm64 linux repo under ilp32 staging branches. 2017-09-01 Szabolcs Nagy <szabolcs.nagy@arm.com> * sysdeps/unix/sysv/linux/aarch64/configure.ac (arch_minimum_kernel): Set to 4.12.0 on ILP32. * sysdeps/unix/sysv/linux/aarch64/configure: Regenerate.
* Add ILP32 support to aarch64 in build-many-glibcs.pySteve Ellcey2019-08-011-0/+8
| | | | | | | 2017-09-01 Steve Ellcey <sellcey@caviumnetworks.com> * scripts/build-many-glibcs.py (Context.add_all_configs): Add ilp32 variants of aarch64 architecture.
* aarch64: Add ILP32 supportSteve Ellcey2019-08-0133-22/+760
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for the ILP32 abi variant to aarch64. 2017-09-01 Andrew Pinski <andrew.pinski@caviumnetworks.com> Yury Norov <ynorov@caviumnetworks.com> Steve Ellcey <sellcey@caviumnetworks.com> * elf/cache.c (print_entry): Add FLAG_AARCH64_LIB32. * sysdeps/aarch64/configure.ac (HAVE_AARCH64_ILP32): New define. (default-abi): Allow for ilp32 ABI. * sysdeps/aarch64/configure: Regenerate. * sysdeps/aarch64/Implies: Deleted. * sysdeps/aarch64/ilp32/Implies: New file. * sysdeps/aarch64/ilp32/Implies-after: New file. * sysdeps/aarch64/lp64/Implies: New file. * sysdeps/aarch64/lp64/Implies-after: New file. * sysdeps/aarch64/nptl/bits/pthreadtypes-arch.h (__PTHREAD_RWLOCK_INT_FLAGS_SHARED): Set to 1. * sysdeps/aarch64/preconfigure (machine): Check for ilp32/lp64. * sysdeps/aarch64/tls-macros.h (TLS_IE): Remove register specification for __result and ifdef for ILP32. * sysdeps/generic/ldconfig.h (FLAG_AARCH64_LIB32): New define. * sysdeps/unix/sysv/linux/aarch64/Implies: Remove generic and wordsize-64 entries. * sysdeps/unix/sysv/linux/aarch64/Makefile (abi-variants): Add new variants for ilp32 and ilp32_be. (abi-lp64-condition, abi-lp64_be-condition): Check for __WORDSIZE equal to 64. (abi-ilp32-condition, abi-ilp32_be-condition): New. * sysdeps/unix/sysv/linux/aarch64/configure.ac (arch_minimum_kernel): Use different value for ILP32. (LIBC_SLIBDIR_RTLDDIR): Modify for ILP32. * sysdeps/unix/sysv/linux/aarch64/configure: Regenerate. * sysdeps/unix/sysv/linux/aarch64/ilp32/Implies: New file. * sysdeps/unix/sysv/linux/aarch64/ilp32/c++-types.data: Likewise. * sysdeps/unix/sysv/linux/aarch64/ilp32/kernel_stat.h: Likewise. * sysdeps/unix/sysv/linux/aarch64/ilp32/shlib-versions: Likewise. * sysdeps/unix/sysv/linux/aarch64/bits/stat.h: Likewise. * sysdeps/unix/sysv/linux/aarch64/bits/statfs.h: Likewise. * sysdeps/unix/sysv/linux/aarch64/bits/typesizes.h: Likewise. * sysdeps/unix/sysv/linux/aarch64/bits/utmp.h: Likewise. * sysdeps/unix/sysv/linux/aarch64/bits/utmpx.h: Likewise. * sysdeps/unix/sysv/linux/aarch64/kernel-features.h: Likewise. * sysdeps/unix/sysv/linux/aarch64/Implies: Add unix/sysv/linux/aarch64. * sysdeps/unix/sysv/linux/aarch64/ioctl.S: Move to lp64 directory. * sysdeps/unix/sysv/linux/aarch64/mmap.c: Likewise. * sysdeps/unix/sysv/linux/aarch64/shlib-versions: Likewise. * sysdeps/unix/sysv/linux/aarch64/c++-types.data: Likewise. * sysdeps/unix/sysv/linux/aarch64/ldd-rewrite.sed: Likewise. * sysdeps/unix/sysv/linux/aarch64/ipc_priv.h (__IPC_64): Check __ILP32 when setting. * sysdeps/unix/sysv/linux/arm/readelflib.c (process_elf_file): Check for EM_AARCH64 when processing ELFCLASS32 object. * sysdeps/unix/sysv/linux/bits/fcntl-linux.h (F_GETLK, F_SETLCK, F_SETLKW): Check for __OFF_T_MATCHES_OFF64_T when defining.
* aarch64: Add abilists for ILP32 supportSteve Ellcey2019-08-0126-0/+3060
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename lp64 abilist files and add new ilp32 abilist files with GLIBC_2.27 symbol versions. 2017-09-01 Andrew Pinski <andrew.pinski@caviumnetworks.com> Yury Norov <ynorov@caviumnetworks.com> Steve Ellcey <sellcey@caviumnetworks.com> * sysdeps/unix/sysv/linux/aarch64/ilp32/ld.abilist: New file. * sysdeps/unix/sysv/linux/aarch64/ilp32/libBrokenLocale.abilist: Likewise. * sysdeps/unix/sysv/linux/aarch64/ilp32/libanl.abilist: Likewise. * sysdeps/unix/sysv/linux/aarch64/ilp32/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/aarch64/ilp32/libcrypt.abilist: Likewise. * sysdeps/unix/sysv/linux/aarch64/ilp32/libdl.abilist: Likewise. * sysdeps/unix/sysv/linux/aarch64/ilp32/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/aarch64/ilp32/libnsl.abilist: Likewise. * sysdeps/unix/sysv/linux/aarch64/ilp32/libpthread.abilist: Likewise. * sysdeps/unix/sysv/linux/aarch64/ilp32/libresolv.abilist: Likewise. * sysdeps/unix/sysv/linux/aarch64/ilp32/librt.abilist: Likewise. * sysdeps/unix/sysv/linux/aarch64/ilp32/libthread_db.abilist: Likewise. * sysdeps/unix/sysv/linux/aarch64/ilp32/libutil.abilist: Likewise. * sysdeps/unix/sysv/linux/aarch64/ld.abilist: Moved to lp64 directory. * sysdeps/unix/sysv/linux/aarch64/libBrokenLocale.abilist: Likewise. * sysdeps/unix/sysv/linux/aarch64/libanl.abilist: Likewise. * sysdeps/unix/sysv/linux/aarch64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/aarch64/libcrypt.abilist: Likewise. * sysdeps/unix/sysv/linux/aarch64/libdl.abilist: Likewise. * sysdeps/unix/sysv/linux/aarch64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/aarch64/libnsl.abilist: Likewise. * sysdeps/unix/sysv/linux/aarch64/libpthread.abilist: Likewise. * sysdeps/unix/sysv/linux/aarch64/libresolv.abilist: Likewise. * sysdeps/unix/sysv/linux/aarch64/librt.abilist: Likewise. * sysdeps/unix/sysv/linux/aarch64/libthread_db.abilist: Likewise. * sysdeps/unix/sysv/linux/aarch64/libutil.abilist: Likewise.
* Tag 2.30 release.glibc-2.30Carlos O'Donell2019-08-013-3/+7
|
* Update install and NEWS for 2.30 release.Carlos O'Donell2019-08-014-12/+119
|
* Update translations.Carlos O'Donell2019-07-3135-8668/+8494
| | | | Update translations from translationproject.org for 2.29.9000.
* iconv: Revert steps array reference counting changesFlorian Weimer2019-07-318-132/+31
| | | | | | | | | | | | | | | The changes introduce a memory leak for gconv steps arrays whose first element is an internal conversion, which has a fixed reference count which is not decremented. As a result, after the change in commit 50ce3eae5ba304650459d4441d7d246a7cefc26f, the steps array is never freed, resulting in an unbounded memory leak. This reverts commit 50ce3eae5ba304650459d4441d7d246a7cefc26f ("gconv: Check reference count in __gconv_release_cache [BZ #24677]") and commit 7e740ab2e7be7d83b75513aa406e0b10875f7f9c ("libio: Fix gconv-related memory leak [BZ #24583]"). It reintroduces bug 24583. (Bug 24677 was just a regression caused by the second commit.)
* Restore r31 setting in powerpc32 swapcontext.Joseph Myers2019-07-302-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | Commit ffe8a9a8318e1db225b22da8bc067408494bac5c, "powerpc: Remove rt_sigreturn usage on context function", removed from powerpc32 swapcontext a setting of r31 that is relied upon in subsequent code. I'm not sure why this didn't produce test failures in Adhemerval's 32-bit testing; in my (soft-float) testing in preparation for 2.30 release, I see several context-related failures FAIL: stdlib/tst-makecontext2 FAIL: stdlib/tst-makecontext3 FAIL: stdlib/tst-setcontext FAIL: stdlib/tst-setcontext2 FAIL: stdlib/tst-setcontext4 FAIL: stdlib/tst-setcontext7 FAIL: stdlib/tst-setcontext9 FAIL: stdlib/tst-swapcontext1 that did not appear in 2.29 testing. This patch restores the removed register setting in question, and thus fixes those failures. Tested for powerpc (soft-float). * sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext-common.S (__CONTEXT_FUNC_NAME): Restore setting of r31.
* nptl: Use uintptr_t for address diagnostic in nptl/tst-pthread-getattrFlorian Weimer2019-07-302-8/+15
| | | | | | | | | | | | | | | | | | | | | Recent GCC versions warn about the attempt to return the address of a local variable: tst-pthread-getattr.c: In function ‘allocate_and_test’: tst-pthread-getattr.c:54:10: error: function returns address of local variable [-Werror=return-local-addr] 54 | return mem; | ^~~ In file included from ../include/alloca.h:3, from tst-pthread-getattr.c:26: ../stdlib/alloca.h:35:23: note: declared here 35 | # define alloca(size) __builtin_alloca (size) | ^~~~~~~~~~~~~~~~~~~~~~~ tst-pthread-getattr.c:51:9: note: in expansion of macro ‘alloca’ 51 | mem = alloca ((size_t) (mem - target)); | ^~~~~~ The address itself is used in a check in the caller, so using uintptr_t instead is reasonable.
* Linux: Move getdents64 to <dirent.h>Florian Weimer2019-07-297-8/+70
| | | | | | This matches the location of the declaration in musl. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* test-container: Install with $(sorted-subdirs) [BZ #24794]Tulio Magno Quites Machado Filho2019-07-293-4/+12
| | | | | | | | | | | | | Commit 35e038c1d2ccb3a75395662f9c4f28d85a61444f started to use an incomplete list of subdirs based on $(all-subdirs) causing testroot.pristine to miss files from nss. Tested if the list of files in testroot.pristine remains the same. [BZ #24794] * Makeconfig (all-subdirs): Improved source comments. * Makefile (testroot.pristine/install.stamp): Pass subdirs='$(sorted-subdirs)' to make install.
* gconv: Check reference count in __gconv_release_cache [BZ #24677]Florian Weimer2019-07-262-3/+12
| | | | | | | | | | This fixes a regression introduced in commit 7e740ab2e7be7d83b75513aa406e0b10875f7f9c ("libio: Fix gconv-related memory leak [BZ #24583]"). __gconv_release_cache is only ever called with heap-allocated arrays which contain at least one member. The statically allocated ASCII steps are filtered out by __wcsmbs_close_conv.
* x86-64: Compile branred.c with -mprefer-vector-width=128 [BZ #24603]H.J. Lu2019-07-244-0/+52
| | | | | | | | | | | | | | | | | | | | | When compiled with -O3 and AVX, GCC 8 and 9 optimize some loops in sysdeps/ieee754/dbl-64/branred.c with 256-bit vector instructions, which leads to store forward stall: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90579 There is no easy fix in compiler. This patch limits vector width to 128 bits to work around this issue. It improves performance of sin and cos by more than 40% on Skylake compiled with -O3 -march=skylake. Tested with GCC 7/8/9 on x86-64. [BZ #24603] * sysdeps/x86_64/configure.ac: Check if -mprefer-vector-width=128 works. * sysdeps/x86_64/configure: Regenerated. * sysdeps/x86_64/fpu/Makefile (CFLAGS-branred.c): New. Set to -mprefer-vector-width=128 if supported.
* build-many-glibcs.py: Use Linux 5.2 by defaultFlorian Weimer2019-07-242-1/+6
|
* Linux: Use in-tree copy of SO_ constants for !__USE_MISC [BZ #24532]Florian Weimer2019-07-2410-94/+333
| | | | | | | | | | | | | | | | | | | | The kernel changes for a 64-bit time_t on 32-bit architectures resulted in <asm/socket.h> indirectly including <linux/posix_types.h>. The latter is not namespace-clean for the POSIX version of <sys/socket.h>. This issue has persisted across several Linux releases, so this commit creates our own copy of the SO_* definitions for !__USE_MISC mode. The new test socket/tst-socket-consts ensures that the copy is consistent with the kernel definitions (which vary across architectures). The test is tricky to get right because CPPFLAGS includes include/libc-symbols.h, which in turn defines _GNU_SOURCE unconditionally. Tested with build-many-glibcs.py. I verified that a discrepancy in the definitions actually results in a failure of the socket/tst-socket-consts test.
* test-container: Install with $(all-subdirs) [BZ #24794]Tulio Magno Quites Machado Filho2019-07-232-1/+6
| | | | | | | | | | | | | Whenever a sub-make is created, it inherits the variable subdirs from its parent. This is also true when make check is called with a restricted list of subdirs. In this scenario, make install is executed "partially" and testroot.pristine ends up with an incomplete installation. [BZ #24794] * Makefile (testroot.pristine/install.stamp): Pass subdirs='$(all-subdirs)' to make install. Reviewed-by: DJ Delorie <dj@redhat.com>
* test-container: Avoid copying unintended system librariesTulio Magno Quites Machado Filho2019-07-232-2/+7
| | | | | | | | | | | | | | Some DSOs are distributed in hardware capability directories, e.g. /usr/lib64/power7/libc.so.6 Whenever the processor is able to use one of these hardware-enabled DSOs, testroot.pristine ends up with copies of glibc-provided libraries from the system because it can't overwrite or remove them. This patch avoids the unintended copies by executing ld.so with the same arguments passed to each glibc test. * Makefile (testroot.pristine/install.stamp): Execute ld.so with the same arguments used in all tests.
* Add NEWS entry about the new AArch64 IFUNC resolver call ABISzabolcs Nagy2019-07-222-0/+8
| | | | | | | | | | | | The new IFUNC resolver call ABI was introduced in commit 2b8a3c86e7606cf1b0a997dad8af2d45ae8989c3 Commit: Szabolcs Nagy <szabolcs.nagy@arm.com> CommitDate: 2019-07-04 11:13:32 +0100 aarch64: new ifunc resolver ABI See the commit log and the comments in sys/ifunc.h for details.
* locale/C-translit.h.in: Cyrillic -> ASCII transliteration [BZ #2872]Egor Kobylkin2019-07-202-0/+174
| | | | | | | | This patch adds Cyrillic to plain ASCII transliteration table according to GOST 7.79-2000 System B standard to the C locale. [BZ #2872] * locale/C-translit.h.in: Add Cyrillic transliteration.
* Linux: Update syscall-names.list to Linux 5.2Florian Weimer2019-07-192-1/+18
| | | | | | | This adds the system call names fsconfig, fsmount, fsopen, fspick, move_mount, open_tree. Tested with build-many-glibcs.py.
* Regenerate po/libc.pot for 2.30 release.Carlos O'Donell2019-07-182-225/+220
|
* nptl: Add POSIX-proposed _clock functions to hppa pthread.hAdhemerval Zanella2019-07-182-0/+41
| | | | | | | | | | | | | | The pthread _clock functions that were recently added to nptl need to be declared in hppa's pthread.h too. After this change, the function declaration part of sysdeps/nptl/pthread.h and sysdeps/unix/sysv/linux/hppa/pthread.h are identical. * sysdeps/unix/sysv/linux/hppa/pthread.h: Add declarations of functions recently added to sysdeps/nptl/pthread.h: pthread_mutex_clocklock, pthread_rwlock_clockrdlock, pthread_rwlock_clockwrlock and pthread_cond_clockwait. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* nptl: Remove unnecessary forwarding of pthread_cond_clockwait from libcMike Crowe2019-07-184-10/+10
| | | | | | | | | | | | | | | | | | | | In afe4de7d283ebd88157126c5494ce1796194c16e, I added forwarding functions from libc to libpthread for __pthread_cond_clockwait and pthread_cond_clockwait to mirror those for pthread_cond_timedwait. These are unnecessary[1], since these functions aren't (yet) being called from within libc itself. Let's remove them. * nptl/forward.c: Remove unnecessary __pthread_cond_clockwait and pthread_cond_clockwait forwarding functions. There are no internal users, so it is unnecessary to expose these functions in libc.so. * sysdeps/nptl/pthread-functions.h (pthread_functions): Remove unnecessary ptr___pthread_cond_clockwait member. * nptl/nptl-init.c (pthread_functions): Remove assignment of removed member. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org> [1] https://sourceware.org/ml/libc-alpha/2017-10/msg00082.html
* Afar locales: Months and days updated from CLDR (bug 21897).Rafal Luzynski2019-07-175-12/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit updates month and weekday names (full and abbreviated) from CLDR 35.1 with the following exceptions. It was not clear why the full name of February in aa_DJ and aa_ER was "Kudo" while the abbreviated version is "Nah" but some additional sources [1] [2] as well as the content of aa_ER and aa_ER@saaho suggest it should be "Naharsi Kudo". This commit consequently sets the translation of February to "Naharsi Kudo" in aa_DJ and aa_ET. aa_ER@saaho is not supported by CLDR but since the month names were identical to aa_ER before this commit, the same values have been copied from aa_ER. Links: [1] https://fr.wiktionary.org/wiki/naharsi_kudo [2] http://www.mcit.gov.et/web/guest/-/localization-standard-for-afaraf [BZ #21897] * localedata/locales/aa_DJ (abday): Update from CLDR, all words begin with an uppercase letter now. (abmon): Likewise. (mon): Update from CLDR, reword February from "Kudo" to "Naharsi Kudo", April from "Agda Baxisso" to "Agda Baxis", and August from "Liiqen" to "Leqeeni". * localedata/locales/aa_ER (mon): Update from CLDR, reword April from "Agda Baxisso" to "Agda Baxis" and August from "Leqeeni" to "Liiqen". * localedata/locales/aa_ER@saaho (mon): Likewise. * localedata/locales/aa_ET (abmon): Update from CLDR, reword abbreviated February from "Kud" to "Nah". (mon): Update from CLDR, reword February from "Kudo" to "Naharsi Kudo" and April from "Agda Baxisso" to "Agda Baxis".
* nl_BE locale: Use "copy "nl_NL"" in LC_NAME (bug 23996).Rafal Luzynski2019-07-172-6/+6
| | | | | | | The content of the section is identical in both languages. [BZ #23996] * localedata/locales/nl_BE (LC_NAME): Replace with “copy "nl_NL"”.
* nl_BE and nl_NL locales: Dutch salutations (bug 23996).PanderMusubi2019-07-173-0/+17
| | | | | | | [BZ #23996] * localedata/locales/nl_BE (LC_NAME): Add name_gen, name_mr, name_mrs, name_miss, and name_ms. * localedata/locales/nl_NL (LC_NAME): Likewise.
* ga_IE and en_IE locales: Revert first_weekday removal (bug 24200).Daniil Zhilin2019-07-173-0/+8
| | | | | | | | These values were removed by the commit 0a410e76f5. [BZ #24200] * localedata/locales/ga_IE (first_weekday): Add, set to 2 (Monday). * localedata/locales/en_IE (first_weekday): Likewise.
* nptl: Remove futex_supports_exact_relative_timeoutsMike Crowe2019-07-125-26/+12
| | | | | | | | | | | | | | | | | | The only implementation of futex_supports_exact_relative_timeouts always returns true. Let's remove it and all its callers. * nptl/pthread_cond_wait.c: (__pthread_cond_clockwait): Remove code that is only useful if futex_supports_exact_relative_timeouts () returns false. * nptl/pthread_condattr_setclock.c: (pthread_condattr_setclock): Likewise. * sysdeps/nptl/futex-internal.h: Remove comment about relative timeouts potentially being imprecise since it's no longer true. Remove declaration of futex_supports_exact_relative_timeouts. * sysdeps/unix/sysv/linux/futex-internal.h: Remove implementation of futex_supports_exact_relative_timeouts. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Update NEWS for new _clockwait and _clocklock functionsMike Crowe2019-07-122-0/+13
| | | | | | | | * NEWS: Mention recently-added pthread_cond_clockwait, pthread_rwlock_clockrdlock, pthread_rwlock_clockwrlock and sem_clockwait functions. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* nptl: Add POSIX-proposed pthread_mutex_clocklockMike Crowe2019-07-1235-27/+267
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add POSIX-proposed pthread_mutex_clocklock function that works like pthread_mutex_timedlock but takes a clockid parameter to measure the abstime parameter against. * sysdeps/nptl/pthread.h: Add pthread_mutex_clocklock. * nptl/DESIGN-systemtap-probes.txt: Likewise. * nptl/pthread_mutex_timedlock.c (__pthread_mutex_clocklock_common): Rename from __pthread_mutex_timedlock and add clockid parameter. Pass this parameter to lll_clocklock and lll_clocklock_elision in place of CLOCK_REALTIME. (__pthread_mutex_clocklock): New function to add LIBC_PROBE and validate clockid parameter before calling __pthread_mutex_clocklock_common. (__pthread_mutex_timedlock): New implementation to add LIBC_PROBE and calls __pthread_mutex_clocklock_common passing CLOCK_REALTIME as the clockid. * nptl/Makefile: Add tst-mutex11.c. * nptl/tst-abstime.c (th): Add tests for pthread_mutex_clocklock. * nptl/tst-mutex11.c: New tests for passing invalid and unsupported clockid parameters to pthread_mutex_clocklock. * nptl/tst-mutex5.c (do_test_clock): Rename from do_test and take clockid parameter to indicate which clock to be used. Call pthread_mutex_timedlock or pthread_mutex_clocklock as appropriate. (do_test): Call do_test_clock to separately test pthread_mutex_timedlock, pthread_mutex_clocklock(CLOCK_REALTIME) and pthread_mutex_clocklock(CLOCK_MONOTONIC). * nptl/tst-mutex9.c: Likewise. * nptl/Versions (GLIBC_2.30): Add pthread_mutex_clocklock. * sysdeps/unix/sysv/linux/aarch64/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/alpha/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/arm/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/csky/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/hppa/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/i386/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/ia64/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/m68k/coldfire/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/m68k/m680x0/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/microblaze/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/mips/mips32/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/mips/mips64/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/nios2/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/riscv/rv64/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/sh/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/x86_64/64/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/x86_64/x32/libpthread.abilist (GLIBC_2.30): Likewise. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* nptl: Rename lll_timedlock to lll_clocklock and add clockid parameterMike Crowe2019-07-1213-54/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename lll_timedlock to lll_clocklock and add clockid parameter to indicate the clock that the abstime parameter should be measured against in preparation for adding pthread_mutex_clocklock. The name change mirrors the naming for the exposed pthread functions: timed => absolute timeout measured against CLOCK_REALTIME (or clock specified by attribute in the case of pthread_cond_timedwait.) clock => absolute timeout measured against clock specified in preceding parameter. * sysdeps/nptl/lowlevellock.h (lll_clocklock): Rename from lll_timedlock and add clockid parameter. (__lll_clocklock): Rename from __lll_timedlock and add clockid parameter. * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_clocklock): Likewise. * nptl/lll_timedlock_wait.c (__lll_clocklock_wait): Rename from __lll_timedlock_wait and add clockid parameter. Use __clock_gettime rather than __gettimeofday so that clockid can be used. This means that conversion from struct timeval is no longer required. * sysdeps/sparc/sparc32/lowlevellock.c (lll_clocklock_wait): Likewise. * sysdeps/sparc/sparc32/lll_timedlock_wait.c: Update comment to refer to __lll_clocklock_wait rather than __lll_timedlock_wait. * nptl/pthread_mutex_timedlock.c (lll_clocklock_elision): Rename from lll_timedlock_elision, add clockid parameter and use meaningful names for other parameters. (__pthread_mutex_timedlock): Pass CLOCK_REALTIME where necessary to lll_clocklock and lll_clocklock_elision. * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_clocklock_elision): Rename from lll_timedlock_elision and add clockid parameter. (__lll_clocklock_elision): Rename from __lll_timedlock_elision and add clockid parameter. * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise. * sysdeps/unix/sysv/linux/x86/lowlevellock.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/elision-timed.c (__lll_lock_elision): Call __lll_clocklock_elision rather than __lll_timedlock_elision. (EXTRAARG): Add clockid parameter. (LLL_LOCK): Likewise. * sysdeps/unix/sysv/linux/s390/elision-timed.c: Likewise. * sysdeps/unix/sysv/linux/x86/elision-timed.c: Likewise. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* nptl: Add POSIX-proposed pthread_rwlock_clockrdlock & pthread_rwlock_clockwrlockMike Crowe2019-07-1241-100/+493
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add: int pthread_rwlock_clockrdlock (pthread_rwlock_t *rwlock, clockid_t clockid, const struct timespec *abstime) and: int pthread_rwlock_clockwrlock (pthread_rwlock_t *rwlock, clockid_t clockid, const struct timespec *abstime) which behave like pthread_rwlock_timedrdlock and pthread_rwlock_timedwrlock respectively, except they always measure abstime against the supplied clockid. The functions currently support CLOCK_REALTIME and CLOCK_MONOTONIC and return EINVAL if any other clock is specified. * sysdeps/nptl/pthread.h: Add pthread_rwlock_clockrdlock and pthread_wrlock_clockwrlock. * nptl/Makefile: Build pthread_rwlock_clockrdlock.c and pthread_rwlock_clockwrlock.c. * nptl/pthread_rwlock_clockrdlock.c: Implement pthread_rwlock_clockrdlock. * nptl/pthread_rwlock_clockwrlock.c: Implement pthread_rwlock_clockwrlock. * nptl/pthread_rwlock_common.c (__pthread_rwlock_rdlock_full): Add clockid parameter and verify that it indicates a supported clock on entry so that we fail even if it doesn't end up being used. Pass that clock on to futex_abstimed_wait when necessary. (__pthread_rwlock_wrlock_full): Likewise. * nptl/pthread_rwlock_rdlock.c: (__pthread_rwlock_rdlock): Pass CLOCK_REALTIME to __pthread_rwlock_rdlock_full even though it won't be used because there's no timeout. * nptl/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Pass CLOCK_REALTIME to __pthread_rwlock_wrlock_full even though it won't be used because there is no timeout. * nptl/pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock): Pass CLOCK_REALTIME to __pthread_rwlock_rdlock_full since abstime uses that clock. * nptl/pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): Pass CLOCK_REALTIME to __pthread_rwlock_wrlock_full since abstime uses that clock. * sysdeps/unix/sysv/linux/aarch64/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/alpha/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/arm/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/csky/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/hppa/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/i386/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/ia64/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/m68k/coldfire/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/m68k/m680x0/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/microblaze/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/mips/mips32/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/mips/mips64/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/nios2/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/riscv/rv64/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/sh/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/x86_64/64/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/x86_64/x32/libpthread.abilist (GLIBC_2.30): Likewise. * nptl/tst-abstime.c (th): Add pthread_rwlock_clockrdlock and pthread_rwlock_clockwrlock timeout tests to match the existing pthread_rwlock_timedrdloock and pthread_rwlock_timedwrlock tests. * nptl/tst-rwlock14.c (do_test): Likewise. * nptl/tst-rwlock6.c Invent verbose_printf macro, and use for ancillary output throughout. (tf): Accept thread_args structure so that rwlock, a clockid and function name can be passed to the thread. (do_test_clock): Rename from do_test. Accept clockid parameter to specify test clock. Use the magic clockid value of CLOCK_USE_TIMEDLOCK to indicate that pthread_rwlock_timedrdlock and pthread_rwlock_timedwrlock should be tested, otherwise pass the specified clockid to pthread_rwlock_clockrdlock and pthread_rwlock_clockwrlock. Use xpthread_create and xpthread_join. (do_test): Call do_test_clock to test each clockid in turn. * nptl/tst-rwlock7.c: Likewise. * nptl/tst-rwlock9.c (writer_thread, reader_thread): Accept thread_args structure so that the (now int) thread number, the clockid and the function name can be passed to the thread. (do_test_clock): Renamed from do_test. Pass the necessary thread_args when creating the reader and writer threads. Use xpthread_create and xpthread_join. (do_test): Call do_test_clock to test each clockid in turn. * manual/threads.texi: Add documentation for pthread_rwlock_clockrdlock and pthread_rwlock_clockwrclock. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* nptl: pthread_rwlock: Move timeout validation into _full functionsMike Crowe2019-07-124-20/+29
| | | | | | | | | | | | | | | | | | | | As recommended by the comments in the implementations of pthread_rwlock_timedrdlock and pthread_rwlock_timedwrlock, let's move the timeout validity checks into the corresponding pthread_rwlock_rdlock_full and pthread_rwlock_wrlock_full functions. Since these functions may be called with abstime == NULL, an extra check for that is necessary too. * nptl/pthread_rwlock_common.c (__pthread_rwlock_rdlock_full): Check validity of abstime parameter. (__pthread_rwlock_rwlock_full): Likewise. * nptl/pthread_rwlock_timedrdlock.c * (pthread_rwlock_timedrdlock): Remove check for validity of abstime parameter. * nptl/pthread_rwlock_timedwrlock.c * (pthread_rwlock_timedwrlock): Likewise. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* nptl: Add POSIX-proposed pthread_cond_clockwaitMike Crowe2019-07-1237-18/+353
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add: int pthread_cond_clockwait (pthread_cond_t *cond, pthread_mutex_t *mutex, clockid_t clockid, const struct timespec *abstime) which behaves just like pthread_cond_timedwait except it always measures abstime against the supplied clockid. Currently supports CLOCK_REALTIME and CLOCK_MONOTONIC and returns EINVAL if any other clock is specified. Includes feedback from many others. This function was originally proposed[1] as pthread_cond_timedwaitonclock_np, but The Austin Group preferred the new name. * nptl/Makefile: Add tst-cond26 and tst-cond27 * nptl/Versions (GLIBC_2.30): Add pthread_cond_clockwait * sysdeps/nptl/pthread.h: Likewise * nptl/forward.c: Add __pthread_cond_clockwait * nptl/forward.c: Likewise * nptl/pthreadP.h: Likewise * sysdeps/nptl/pthread-functions.h: Likewise * nptl/pthread_cond_wait.c (__pthread_cond_wait_common): Add clockid parameter and comment describing why we don't need to check its value. Use that value when calling futex_abstimed_wait_cancelable rather than reading the clock from the flags. (__pthread_cond_wait): Pass unused clockid parameter. (__pthread_cond_timedwait): Read clock from flags and pass it to __pthread_cond_wait_common. (__pthread_cond_clockwait): Add new function with weak alias from pthread_cond_clockwait. * sysdeps/mach/hurd/i386/libpthread.abilist (GLIBC_2.30): * Likewise. * sysdeps/unix/sysv/linux/aarch64/libpthread.abilist * (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/alpha/libpthread.abilist (GLIBC_2.30): * Likewise. * sysdeps/unix/sysv/linux/arm/libpthread.abilist (GLIBC_2.30): * Likewise. * sysdeps/unix/sysv/linux/csky/libpthread.abilist (GLIBC_2.30): * Likewise. * sysdeps/unix/sysv/linux/hppa/libpthread.abilist (GLIBC_2.30): * Likewise. * sysdeps/unix/sysv/linux/i386/libpthread.abilist (GLIBC_2.30): * Likewise. * sysdeps/unix/sysv/linux/ia64/libpthread.abilist (GLIBC_2.30): * Likewise. * sysdeps/unix/sysv/linux/m68k/coldfire/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/m68k/m680x0/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/microblaze/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/mips/mips32/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/mips/mips64/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/nios2/libpthread.abilist (GLIBC_2.30): * Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/riscv/rv64/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/sh/libpthread.abilist (GLIBC_2.30): * Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/x86_64/64/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/x86_64/x32/libpthread.abilist (GLIBC_2.30): Likewise. * nptl/tst-cond11.c (run_test): Support testing pthread_cond_clockwait too by using a special magic CLOCK_USE_ATTR_CLOCK value to determine whether to call pthread_cond_timedwait or pthread_cond_clockwait. (do_test): Pass CLOCK_USE_ATTR_CLOCK for existing tests, and add new tests using all combinations of CLOCK_MONOTONIC and CLOCK_REALTIME. * ntpl/tst-cond26.c: New test for passing unsupported and * invalid clocks to pthread_cond_clockwait. * nptl/tst-cond27.c: Add test similar to tst-cond5.c, but using struct timespec and pthread_cond_clockwait. * manual/threads.texi: Document pthread_cond_clockwait. The * comment was provided by Carlos O'Donell. [1] https://sourceware.org/ml/libc-alpha/2015-07/msg00193.html Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* nptl: Add POSIX-proposed sem_clockwaitMike Crowe2019-07-1236-20/+293
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add: int sem_clockwait (sem_t *sem, clockid_t clock, const struct timespec *abstime) which behaves just like sem_timedwait, but measures abstime against the specified clock. Currently supports CLOCK_REALTIME and CLOCK_MONOTONIC and sets errno == EINVAL if any other clock is specified. * nptl/sem_waitcommon.c (do_futex_wait, __new_sem_wait_slow): Add clockid parameters to indicate the clock which abstime should be measured against. * nptl/sem_timedwait.c (sem_timedwait), nptl/sem_wait.c (__new_sem_wait): Pass CLOCK_REALTIME as clockid to __new_sem_wait_slow. * nptl/sem_clockwait.c: New file to implement sem_clockwait based on sem_timedwait.c. * nptl/Makefile: Add sem_clockwait.c source file. Add CFLAGS for sem_clockwait.c to match those used for sem_timedwait.c. * sysdeps/pthread/semaphore.h: Add sem_clockwait. * nptl/Versions (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/aarch64/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/alpha/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/arm/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/csky/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/hppa/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/i386/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/ia64/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/m68k/coldfire/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/m68k/m680x0/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/microblaze/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/mips/mips32/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/mips/mips64/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/nios2/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/riscv/rv64/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/sh/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/x86_64/64/libpthread.abilist (GLIBC_2.30): Likewise. * sysdeps/unix/sysv/linux/x86_64/x32/libpthread.abilist (GLIBC_2.30): Likewise. * nptl/tst-sem17.c: Add new test for passing invalid clock to sem_clockwait. * nptl/tst-sem13.c, nptl/tst-sem5.c: Modify existing sem_timedwait tests to also test sem_clockwait. * manual/threads.texi: Document sem_clockwait. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* nptl: Add clockid parameter to futex timed wait callsMike Crowe2019-07-129-51/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In preparation for adding POSIX clockwait variants of timedwait functions, add a clockid_t parameter to futex_abstimed_wait functions and pass CLOCK_REALTIME from all callers for the time being. Replace lll_futex_timed_wait_bitset with lll_futex_clock_wait_bitset which takes a clockid_t parameter rather than the magic clockbit. * sysdeps/nptl/lowlevellock-futex.h, sysdeps/unix/sysv/linux/lowlevellock-futex.h: Replace lll_futex_timed_wait_bitset with lll_futex_clock_wait_bitset that takes a clockid rather than a special clockbit. * sysdeps/nptl/lowlevellock-futex.h: Add lll_futex_supported_clockid so that client functions can check whether their clockid parameter is valid even if they don't ultimately end up calling lll_futex_clock_wait_bitset. * sysdeps/nptl/futex-internal.h, sysdeps/unix/sysv/linux/futex-internal.h (futex_abstimed_wait, futex_abstimed_wait_cancelable): Add clockid_t parameter to indicate which clock the absolute time passed should be measured against. Pass that clockid onto lll_futex_clock_wait_bitset. Add invalid clock as reason for returning -EINVAL. * sysdeps/nptl/futex-internal.h, sysdeps/unix/sysv/linux/futex-internal.h: Introduce futex_abstimed_supported_clockid so that client functions can check whether their clockid parameter is valid even if they don't ultimately end up calling futex_abstimed_wait. * nptl/pthread_cond_wait.c (__pthread_cond_wait_common): Remove code to calculate relative timeout for __PTHREAD_COND_CLOCK_MONOTONIC_MASK and just pass CLOCK_MONOTONIC or CLOCK_REALTIME as required to futex_abstimed_wait_cancelable. * nptl/pthread_rwlock_common (__pthread_rwlock_rdlock_full) (__pthread_wrlock_full), nptl/sem_waitcommon (do_futex_wait): Pass additional CLOCK_REALTIME to futex_abstimed_wait_cancelable. * nptl/pthread_mutex_timedlock.c (__pthread_mutex_timedlock): Switch to lll_futex_clock_wait_bitset and pass CLOCK_REALTIME Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* posix: Fix large mmap64 offset for mips64n32 (BZ#24699)Adhemerval Zanella2019-07-105-5/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | The fix for BZ#21270 (commit 158d5fa0e19) added a mask to avoid offset larger than 1^44 to be used along __NR_mmap2. However mips64n32 users __NR_mmap, as mips64n64, but still defines off_t as old non-LFS type (other ILP32, such x32, defines off_t being equal to off64_t). This leads to use the same mask meant only for __NR_mmap2 call for __NR_mmap, thus limiting the maximum offset it can use with mmap64. This patch fixes by setting the high mask only for __NR_mmap2 usage. The posix/tst-mmap-offset.c already tests it and also fails for mips64n32. The patch also change the test to check for an arch-specific header that defines the maximum supported offset. Checked on x86_64-linux-gnu, i686-linux-gnu, and I also tests tst-mmap-offset on qemu simulated mips64 with kernel 3.2.0 kernel for both mips-linux-gnu and mips64-n32-linux-gnu. [BZ #24699] * posix/tst-mmap-offset.c: Mention BZ #24699. (do_test_bz21270): Rename to do_test_large_offset and use mmap64_maximum_offset to check for maximum expected offset value. * sysdeps/generic/mmap_info.h: New file. * sysdeps/unix/sysv/linux/mips/mmap_info.h: Likewise. * sysdeps/unix/sysv/linux/mmap64.c (MMAP_OFF_HIGH_MASK): Define iff __NR_mmap2 is used.
* nss_db: fix endent wrt NULL mappings [BZ #24695] [BZ #24696]DJ Delorie2019-07-1011-2/+189
| | | | | | | | | | | | | nss_db allows for getpwent et al to be called without a set*ent, but it only works once. After the last get*ent a set*ent is required to restart, because the end*ent did not properly reset the module. Resetting it to NULL allows for a proper restart. If the database doesn't exist, however, end*ent erroniously called munmap which set errno. The test case runs "makedb" inside the testroot, so needs selinux DSOs installed.
* aarch64: simplify the DT_AARCH64_VARIANT_PCS handling codeSzabolcs Nagy2019-07-103-6/+9
| | | | | | | | | | | Remove unnecessary variant_pcs field: the dynamic tag can be checked directly. * sysdeps/aarch64/dl-machine.h (elf_machine_runtime_setup): Remove the DT_AARCH64_VARIANT_PCS check. (elf_machine_lazy_rel): Use l_info[DT_AARCH64 (VARIANT_PCS)]. * sysdeps/aarch64/linkmap.h (struct link_map_machine): Remove variant_pcs.