about summary refs log tree commit diff
path: root/manual
Commit message (Collapse)AuthorAgeFilesLines
* Linux: Add getdents64 system callFlorian Weimer2019-06-071-0/+38
| | | | | | | | | | | No 32-bit system call wrapper is added because the interface is problematic because it cannot deal with 64-bit inode numbers and 64-bit directory hashes. A future commit will deprecate the undocumented getdirentries and getdirentries64 functions. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* Small tcache improvementsWilco Dijkstra2019-05-171-1/+1
| | | | | | | | | | | | | | | | Change the tcache->counts[] entries to uint16_t - this removes the limit set by char and allows a larger tcache. Remove a few redundant asserts. bench-malloc-thread with 4 threads is ~15% faster on Cortex-A72. Reviewed-by: DJ Delorie <dj@redhat.com> * malloc/malloc.c (MAX_TCACHE_COUNT): Increase to UINT16_MAX. (tcache_put): Remove redundant assert. (tcache_get): Remove redundant asserts. (__libc_malloc): Check tcache count is not zero. * manual/tunables.texi (glibc.malloc.tcache_count): Update maximum.
* manual: Document O_DIRECTORYFlorian Weimer2019-05-171-0/+7
|
* Linux: Add the tgkill functionFlorian Weimer2019-05-141-0/+15
| | | | | | | | | The tgkill function is sometimes used in crash handlers. <bits/signal_ext.h> follows the same approach as <bits/unistd_ext.h> (which was added for the gettid system call wrapper). Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* manual: Adjust twalk_r documentation.Carlos O'Donell2019-05-141-2/+2
| | | | Reviewed-by: Florian Weimer <fweimer@redhat.com>
* Fix tcache count maximum (BZ #24531)Wilco Dijkstra2019-05-101-2/+2
| | | | | | | | | | | | The tcache counts[] array is a char, which has a very small range and thus may overflow. When setting tcache_count tunable, there is no overflow check. However the tunable must not be larger than the maximum value of the tcache counts[] array, otherwise it can overflow when filling the tcache. [BZ #24531] * malloc/malloc.c (MAX_TCACHE_COUNT): New define. (do_set_tcache_count): Only update if count is small enough. * manual/tunables.texi (glibc.malloc.tcache_count): Document max value.
* misc: Add twalk_r functionFlorian Weimer2019-05-022-1/+80
| | | | | | | | | The twalk function is very difficult to use in a multi-threaded program because there is no way to pass external state to the iterator function. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Extend BIND_NOW to installed programs with --enable-bind-nowFlorian Weimer2019-04-251-4/+4
| | | | | | | | Commit 2d6ab5df3b675e96ee587ae6a8c2ce004c6b1ba9 ("Document and fix --enable-bind-now [BZ #21015]") extended BIND_NOW to all installed shared objects. This change also covers installed programs. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* Add missing percent sign to conversion specifierTAMUKI Shoichi2019-04-111-3/+3
|
* Remove obsolete, never-implemented XSI STREAMS declarationsFlorian Weimer2019-03-141-13/+0
| | | | | | | | | | | | | | | | | | | The stub implementations are turned into compat symbols. Linux actually has two reserved system call numbers (for getpmsg and putpmsg), but these system calls have never been implemented, and there are no plans to implement them, so this patch replaces the wrappers with the generic stubs. According to <https://bugzilla.redhat.com/show_bug.cgi?id=436349>, the presence of the XSI STREAMS declarations is a minor portability hazard because they are not actually implemented. This commit does not change the TIRPC support code in sunrpc/rpc_svcout.c. It uses additional XTI functionality and therefore never worked with glibc. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* Linux: Add gettid system call wrapper [BZ #6399]Florian Weimer2019-02-081-0/+11
| | | | | | | | | | This commit adds gettid to <unistd.h> on Linux, and not to the kernel-independent GNU API. gettid is now supportable on Linux because too many things assume a 1:1 mapping between libpthread threads and kernel threads. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* manual: Document lack of conformance of sched_* functions [BZ #14829]Florian Weimer2019-02-021-26/+34
| | | | | | | | On Linux, we define _POSIX_PRIORITY_SCHEDULING, but functions such as sched_setparam and sched_setscheduler apply to individual threads, not processes. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* Require GCC 6.2 or later to build glibc.Joseph Myers2019-02-011-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | As discussed during development for glibc 2.29, when we increased the required minimum GCC version for building glibc to GCC 5, working purely based on the times at which such requirements have been increased in the past it would be appropriate for glibc 2.30 to require GCC 6 (matching GCC 4.9 having been required for glibc 2.26). Naming 6.2 specifically as the minimum version then means a separate version requirement no longer needs to be specified for powerpc64le. Thus, this patch increases the minimum to 6.2, removing the documentation of the separate requirement for powerpc64le. It does not remove the powerpc64le configure test, or any __GNUC_PREREQ that could be removed as not being in installed headers or files shared with gnulib; I think such cleanups are best done separately. Tested for x86_64. * configure.ac (libc_cv_compiler_ok): Require GCC 6.2 or later. * configure: Regenerated. * manual/install.texi (Tools for Compilation): Update minimum GCC version. * INSTALL: Regenerated.
* manual: Update struct sockaddr_in, struct sockaddr_sin6 descriptionFlorian Weimer2019-02-011-10/+29
| | | | | Clarify the byte order of the the struct fields and document sin6_flowinfo and sin6_scope_id.
* aarch64: Add AmpereComputing emag to tunable cpu listFeng Xue2019-02-011-1/+1
| | | | | | | | | | | | | Emag is a 64-bit CPU core released by AmpereComputing. Add its name to cpu list, and corresponding macro as utilities for later IFUNC dispatch. * manual/tunables.texi (Tunable glibc.cpu.name): Add emag. * sysdeps/unix/sysv/linux/aarch64/cpu-features.c (cpu_list): Add emag. * sysdeps/unix/sysv/linux/aarch64/cpu-features.h (IS_EMAG): New macro.
* Prepare for 2.29 releaseSiddhesh Poyarekar2019-01-312-8/+38
| | | | | | | | | * NEWS: Add the list of bugs fixed in 2.29. * manual/contrib.texi: Update contributors list with some more names. * manual/install.texi: Update latest versions of packages tested. * INSTALL: Regenerated.
* strftime: Pass the additional flags from "%EY" to "%Ey" [BZ #24096]TAMUKI Shoichi2019-01-241-0/+11
| | | | | | | | | | | | | | | | | | | | | | The full representation of the alternative calendar year (%EY) typically includes an internal use of "%Ey". As a GNU extension, apply any flags on "%EY" (e.g. "%_EY", "%-EY") to the internal "%Ey", allowing users of "%EY" to control how the year is padded. Reviewed-by: Rafal Luzynski <digitalfreak@lingonborough.com> Reviewed-by: Zack Weinberg <zackw@panix.com> ChangeLog: [BZ #24096] * manual/time.texi (strftime): Document "%EC" and "%EY". * time/Makefile (tests): Add tst-strftime2. (LOCALES): Add ja_JP.UTF-8, lo_LA.UTF-8, and th_TH.UTF-8. * time/strftime_l.c (__strftime_internal): Add argument yr_spec to override padding for "%Ey". If an optional flag ('_' or '-') is specified to "%EY", interpret the "%Ey" in the subformat as if decorated with that flag. * time/tst-strftime2.c: New file.
* strftime: Set the default width of "%Ey" to 2 [BZ #23758]TAMUKI Shoichi2019-01-241-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Japanese locales, strftime's alternative year format (%Ey) produces a year numbered within a time period called an _era_. A new era typically begins when a new emperor is enthroned. The result of "%Ey" is therefore usually a one- or two-digit number. Many programs that display Japanese era dates assume that the era year is two digits wide. To improve how these programs display dates during the first nine years of a new era, change "%Ey" to pad one- digit numbers on the left with a zero. This change applies to all locales. It is expected to be harmless for other locales that use the alternative year format (e.g. lo_LA and th_TH, in which "%Ey" produces the year of the Buddhist calendar) as those calendars' year numbers are already more than two digits wide, and this is not expected to change. This change needs to be in place before 2019-05-01 CE, as a new era is scheduled to begin on that date. Reviewed-by: Zack Weinberg <zackw@panix.com> Reviewed-by: Rafal Luzynski <digitalfreak@lingonborough.com> ChangeLog: [BZ #23758] * manual/time.texi (strftime): Document "%Ey". * time/strftime_l.c (__strftime_internal): Set the default width padding with zero of "%Ey" to 2.
* manual: Fix the wording to "alternative" rather than "alternate"TAMUKI Shoichi2019-01-181-3/+3
| | | | | | | ChangeLog: * manual/time.texi (strftime): Fix the wording to "alternative" rather than "alternate".
* [AArch64] Add ifunc support for AresWilco Dijkstra2019-01-091-1/+1
| | | | | | | | | | | | | | | Add Ares to the midr_el0 list and support ifunc dispatch. Since Ares supports 2 128-bit loads/stores, use Neon registers for memcpy by selecting __memcpy_falkor by default (we should rename this to __memcpy_simd or similar). * manual/tunables.texi (glibc.cpu.name): Add ares tunable. * sysdeps/aarch64/multiarch/memcpy.c (__libc_memcpy): Use __memcpy_falkor for ares. * sysdeps/unix/sysv/linux/aarch64/cpu-features.h (IS_ARES): Add new define. * sysdeps/unix/sysv/linux/aarch64/cpu-features.c (cpu_list): Add ares cpu.
* manual: Use @code{errno} instead of @var{errno} [BZ #24063]Florian Weimer2019-01-0711-31/+31
| | | | | | @var is intended for placeholders (such as function parameters). Actual variables need to use @code because @var causes upper-case output, resulting in a different C identifier.
* Fix the manual for old texinfoSzabolcs Nagy2019-01-041-4/+4
| | | | | | | | | | | | | | | | | | | | | Installing the manual fails with texinfo 4.13: /S/manual/maint.texi:288: Unknown command `lbracechar'. /S/manual/maint.texi:288: Misplaced {. /S/manual/maint.texi:288: Misplaced }. /S/manual/maint.texi:290: Unknown command `rbracechar'. /S/manual/maint.texi:290: Misplaced {. /S/manual/maint.texi:290: Misplaced }. /S/manual/maint.texi:302: Unknown command `lbracechar'. /S/manual/maint.texi:302: Misplaced {. /S/manual/maint.texi:302: Misplaced }. /S/manual/maint.texi:305: Unknown command `rbracechar'. /S/manual/maint.texi:305: Misplaced {. /S/manual/maint.texi:305: Misplaced }. makeinfo: Removing output file `/B/manual/libc.info' due to errors; use --force to preserve. make[2]: *** [Makefile:142: /B/manual/libc.info] Error 1 * manual/maint.texi: Use @{ and @}.
* Update miscellaneous files from upstream sources.Joseph Myers2019-01-011-65/+6
| | | | | | | | | | | | | | This patch updates some miscellaneous files from their upstream sources (thereby bringing in copyright date updates for some of those files). Tested for x86_64, including "make pdf". * manual/texinfo.tex: Update to version 2018-12-28.17 with trailing whitespace removed. * scripts/config.guess: Update to version 2019-01-01. * scripts/config.sub: Update to version 2019-01-01. * scripts/move-if-change: Update from gnulib.
* Update copyright dates not handled by scripts/update-copyrights.Joseph Myers2019-01-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I've updated copyright dates in glibc for 2019. This is the patch for the changes not generated by scripts/update-copyrights and subsequent build / regeneration of generated files. Please remember to include 2019 in the dates for any new files added in future (which means updating any existing uncommitted patches you have that add new files to use the new copyright dates in them). * NEWS: Update copyright dates. * catgets/gencat.c (print_version): Likewise. * csu/version.c (banner): Likewise. * debug/catchsegv.sh: Likewise. * debug/pcprofiledump.c (print_version): Likewise. * debug/xtrace.sh (do_version): Likewise. * elf/ldconfig.c (print_version): Likewise. * elf/ldd.bash.in: Likewise. * elf/pldd.c (print_version): Likewise. * elf/sotruss.sh: Likewise. * elf/sprof.c (print_version): Likewise. * iconv/iconv_prog.c (print_version): Likewise. * iconv/iconvconfig.c (print_version): Likewise. * locale/programs/locale.c (print_version): Likewise. * locale/programs/localedef.c (print_version): Likewise. * login/programs/pt_chown.c (print_version): Likewise. * malloc/memusage.sh (do_version): Likewise. * malloc/memusagestat.c (print_version): Likewise. * malloc/mtrace.pl: Likewise. * manual/libc.texinfo: Likewise. * nptl/version.c (banner): Likewise. * nscd/nscd.c (print_version): Likewise. * nss/getent.c (print_version): Likewise. * nss/makedb.c (print_version): Likewise. * posix/getconf.c (main): Likewise. * scripts/test-installation.pl: Likewise. * sysdeps/unix/sysv/linux/lddlibc4.c (main): Likewise.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2019-01-0146-46/+46
| | | | | | | * All files with FSF copyright notices: Update copyright dates using scripts/update-copyrights. * locale/programs/charmap-kw.h: Regenerated. * locale/programs/locfile-kw.h: Likewise.
* Require GCC 5 or later to build glibc (bug 23993).Joseph Myers2018-12-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | We know that building glibc with GCC 4.9 is broken on various platforms (bug 23993). As it's more than a year since we last increased the minimum GCC version to build glibc, this patch changes the requirement to be GCC 5 or later (indeed, based on 4.9 having been required for building 2.26, it would be consistent in terms of timing to require GCC 6 or later from the 2.30 release onwards). It deliberately just updates the configure test and corresponding documentation, leaving removal of no-longer-needed __GNUC_PREREQ tests for a separate patch. In the NEWS entry, the requirement for a newer GCC version for powerpc64le is reiterated (as in the entry for the 4.9 requirement in 2.26) to avoid suggesting the version requirement there has gone down. (If that version goes up further as part of support for binary128 long double, of course the wording would change at that time.) Tested for x86_64. [BZ #23993] * configure.ac (libc_cv_compiler_ok): Require GCC 5 or later. * configure: Regenerated. * manual/install.texi (Tools for Compilation): Update minimum GCC version. * INSTALL: Regenerated.
* manual/examples: Remove redundant "if not"H.J. Lu2018-12-2041-41/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace "if not, if not," with "if not,". * manual/examples/add.c: Remove redundant "if not". * manual/examples/argp-ex1.c: Likewise. * manual/examples/argp-ex2.c: Likewise. * manual/examples/argp-ex3.c: Likewise. * manual/examples/argp-ex4.c: Likewise. * manual/examples/atexit.c: Likewise. * manual/examples/db.c: Likewise. * manual/examples/dir.c: Likewise. * manual/examples/dir2.c: Likewise. * manual/examples/execinfo.c: Likewise. * manual/examples/filecli.c: Likewise. * manual/examples/filesrv.c: Likewise. * manual/examples/fmtmsgexpl.c: Likewise. * manual/examples/genpass.c: Likewise. * manual/examples/inetcli.c: Likewise. * manual/examples/inetsrv.c: Likewise. * manual/examples/isockad.c: Likewise. * manual/examples/longopt.c: Likewise. * manual/examples/memopen.c: Likewise. * manual/examples/memstrm.c: Likewise. * manual/examples/mkdirent.c: Likewise. * manual/examples/mkfsock.c: Likewise. * manual/examples/mkisock.c: Likewise. * manual/examples/mygetpass.c: Likewise. * manual/examples/pipe.c: Likewise. * manual/examples/popen.c: Likewise. * manual/examples/rprintf.c: Likewise. * manual/examples/search.c: Likewise. * manual/examples/select.c: Likewise. * manual/examples/setjmp.c: Likewise. * manual/examples/sigh1.c: Likewise. * manual/examples/sigusr.c: Likewise. * manual/examples/stpcpy.c: Likewise. * manual/examples/strdupa.c: Likewise. * manual/examples/strftim.c: Likewise. * manual/examples/subopt.c: Likewise. * manual/examples/swapcontext.c: Likewise. * manual/examples/termios.c: Likewise. * manual/examples/testopt.c: Likewise. * manual/examples/testpass.c: Likewise. * manual/examples/timeval_subtract.c: Likewise.
* locale: Rewrite locale/gen-translit.pl in PythonFlorian Weimer2018-12-181-4/+3
| | | | | | This commit does not change the generated output file. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* Fix __TIMERSIZE and @theglibcadj typosAlbert ARIBAUD (3ADEV)2018-12-181-1/+1
| | | | | | Fix following typos in parent commit: - ChangeLog: __TIMERSIZE should be __TIMESIZE - manual/maint.texi: @theglibcadj should be @glibcadj
* Y2038: add function __localtime64Albert ARIBAUD (3ADEV)2018-12-171-0/+125
| | | | | | | | | | | Tested with 'make check' on x86_64-linux-gnu and i686-linux.gnu. * include/time.h (__localtime64): Add. * manual/maint.texi: Document Y2038 symbol handling. * time/localtime.c (__localtime64): Add. [__TIMERSIZE != 64] (__localtime): Turn into a wrapper.
* manual: Document thread/task IDs for LinuxFlorian Weimer2018-12-142-18/+46
| | | | Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* Use gen-as-const.py to process .pysym files.Joseph Myers2018-12-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch eliminates the gen-py-const.awk variant of gen-as-const, switching to use of gnu-as-const.py (with a new --python option) to process .pysym files (i.e., to generate nptl_lock_constants.py), as the syntax of those files is identical to that of .sym files. Note that the generated nptl_lock_constants.py is *not* identical to the version generated by the awk script. Apart from the trivial changes (comment referencing the new script, and output being sorted), the constant FUTEX_WAITERS, PTHREAD_MUTEXATTR_FLAG_BITS, PTHREAD_MUTEXATTR_FLAG_PSHARED and PTHREAD_MUTEX_PRIO_CEILING_MASK are now output as positive rather than negative constants (on x86_64 anyway; maybe not necessarily on 32-bit systems): < FUTEX_WAITERS = -2147483648 --- > FUTEX_WAITERS = 2147483648 < PTHREAD_MUTEXATTR_FLAG_BITS = -251662336 < PTHREAD_MUTEXATTR_FLAG_PSHARED = -2147483648 --- > PTHREAD_MUTEXATTR_FLAG_BITS = 4043304960 > PTHREAD_MUTEXATTR_FLAG_PSHARED = 2147483648 < PTHREAD_MUTEX_PRIO_CEILING_MASK = -524288 --- > PTHREAD_MUTEX_PRIO_CEILING_MASK = 4294443008 This is because gen-as-const has a cast of the constant value to long int, which gen-py-const lacks. I think the positive values are more logically correct, since the constants in question are in fact unsigned in C. But to reliably produce gen-as-const.py output for constants that always (in C and Python) reflects the signedness of values with the high bit of "long int" set would mean more complicated logic needs to be used in computing values. The more correct positive values by themselves produce a failure of nptl/test-mutexattr-printers, because masking with ~PTHREAD_MUTEXATTR_FLAG_BITS & ~PTHREAD_MUTEX_NO_ELISION_NP now leaves a bit -1 << 32 in the Python value, resulting in a KeyError exception. To avoid that, places masking with ~ of one of the constants in question are changed to mask with 0xffffffff as well (this reflects how ~ in Python applies to an infinite-precision integer whereas ~ in C does not do any promotions beyond the width of int). Tested for x86_64. * scripts/gen-as-const.py (main): Handle --python option. * scripts/gen-py-const.awk: Remove. * Makerules (py-const-script): Use gen-as-const.py. ($(py-const)): Likewise. * nptl/nptl-printers.py (MutexPrinter.read_status_no_robust): Mask with 0xffffffff together with ~(PTHREAD_MUTEX_PRIO_CEILING_MASK). (MutexAttributesPrinter.read_values): Mask with 0xffffffff together with ~PTHREAD_MUTEXATTR_FLAG_BITS and ~PTHREAD_MUTEX_NO_ELISION_NP. * manual/README.pretty-printers: Update reference to gen-py-const.awk.
* Add getcpuH.J. Lu2018-12-071-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add #include <sched.h> int getcpu (unsigned int *cpu, unsigned int *node); to return currently used CPU and NUMA node. Tested on x86-64, x32 and i686 as well as with build-many-glibcs.py. * NEWS: Mention getcpu. * include/sched.h (__getcpu): New libc_hidden_proto. * manual/resource.texi: Document getcpu. * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add getcpu. * sysdeps/unix/sysv/linux/Versions (GLIBC_2.29): Add getcpu. * sysdeps/unix/sysv/linux/aarch64/libc.abilist: Add getcpu. * sysdeps/unix/sysv/linux/alpha/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/arm/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/hppa/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/i386/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/ia64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/microblaze/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/nios2/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/libc-le.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/sh/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/x86_64/64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/bits/sched.h (getcpu): New prototype. * sysdeps/unix/sysv/linux/getcpu.c: New file. * sysdeps/unix/sysv/linux/tst-skeleton-affinity.c (test_size): Also check getcpu.
* Update miscellaneous files from upstream sources.Joseph Myers2018-12-061-5/+47
| | | | | | | | | | | | | | | This patch updates various miscellaneous files from their upstream sources. Tested for x86_64, including "make pdf". * manual/texinfo.tex: Update to version 2018-09-21.20 with trailing whitespace removed. * scripts/config.guess: Update to version 2018-11-28. * scripts/config.sub: Update to version 2018-11-28. * scripts/install-sh: Update to version 2018-03-11.20. * scripts/mkinstalldirs: Update to version 2018-03-07.03. * scripts/move-if-change: Update to version 2018-03-07 03:47.
* Mutex: Add pthread mutex tunablesKemi Wang2018-12-011-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch does not have any functionality change, we only provide a spin count tunes for pthread adaptive spin mutex. The tunable glibc.pthread.mutex_spin_count tunes can be used by system administrator to squeeze system performance according to different hardware capabilities and workload characteristics. The maximum value of spin count is limited to 32767 to avoid the overflow of mutex->__data.__spins variable with the possible type of short in pthread_mutex_lock (). The default value of spin count is set to 100 with the reference to the previous number of times of spinning via trylock. This value would be architecture-specific and can be tuned with kinds of benchmarks to fit most cases in future. I would extend my appreciation sincerely to H.J.Lu for his help to refine this patch series. * manual/tunables.texi (POSIX Thread Tunables): New node. * nptl/Makefile (libpthread-routines): Add pthread_mutex_conf. * nptl/nptl-init.c: Include pthread_mutex_conf.h (__pthread_initialize_minimal_internal) [HAVE_TUNABLES]: Call __pthread_tunables_init. * nptl/pthreadP.h (MAX_ADAPTIVE_COUNT): Remove. (max_adaptive_count): Define. * nptl/pthread_mutex_conf.c: New file. * nptl/pthread_mutex_conf.h: New file. * sysdeps/generic/adaptive_spin_count.h: New file. * sysdeps/nptl/dl-tunables.list: New file. * nptl/pthread_mutex_lock.c (__pthread_mutex_lock): Use max_adaptive_count () not MAX_ADAPTIVE_COUNT. * nptl/pthread_mutex_timedlock.c (__pthrad_mutex_timedlock): Likewise. Suggested-by: Andi Kleen <andi.kleen@intel.com> Reviewed-by: Carlos O'Donell <carlos@redhat.com> Signed-off-by: Kemi.wang <kemi.wang@intel.com>
* malloc: tcache double free checkDJ Delorie2018-11-201-0/+12
| | | | | | | | | | | | | * malloc/malloc.c (tcache_entry): Add key field. (tcache_put): Set it. (tcache_get): Likewise. (_int_free): Check for double free in tcache. * malloc/tst-tcfree1.c: New. * malloc/tst-tcfree2.c: New. * malloc/Makefile: Run the new tests. * manual/probes.texi: Document memory_tcache_double_free probe. * dlfcn/dlerror.c (check_free): Prevent double frees.
* Use STRFMON_LDBL_IS_DBL instead of __ldbl_is_dbl.Zack Weinberg2018-11-161-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | On platforms where long double used to have the same format as double, but later switched to a different format (alpha, s390, sparc, and powerpc), accessing the older behavior is possible and it happens via __nldbl_* functions (not on the API, but accessible from header redirection and from compat symbols). These functions write to the global flag __ldbl_is_dbl, which tells other functions that long double variables should be handled as double. This patch takes the first step towards removing this global flag and creates __vstrfmon_l_internal, which takes an explicit flags parameter. This change arguably makes the generated code slightly worse on architectures where __ldbl_is_dbl is never true; right now, on those architectures, it's a compile-time constant; after this change, the compiler could theoretically prove that __vstrfmon_l_internal was never called with a nonzero flags argument, but it would probably need LTO to do it. This is not performance critical code and I tend to think that the maintainability benefits of removing action at a distance are worth it. However, we _could_ wrap the runtime flag check with a macro that was defined to ignore its argument and always return false on architectures where __ldbl_is_dbl is never true, if people think the codegen benefits are important. Tested for powerpc and powerpc64le.
* Fix typo in the documentation of gcvtGabriel F. T. Gomes2018-11-011-1/+1
| | | | | | | In the description of gcvt, add missing closing parenthesis in the comparison with sprintf. * manual/arith.texi (gcvt): Add missing closing parenthesis.
* hurd: Fix errno* generationSamuel Thibault2018-10-311-0/+13
| | | | | | | | * sysdeps/mach/hurd/errnos.awk: Avoid printing errnos.d. * sysdeps/gnu/errlist.c (EIEIO): Move text to... * manual/errno.texi (EIEIO): ... here. * sysdeps/gnu/errlist.c (EIEIO): Regenerate. * sysdeps/mach/hurd/bits/errno.h: Regenerate.
* Patch to require Python 3.4 or later to build glibc.Joseph Myers2018-10-292-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes Python 3.4 or later a required tool for building glibc, so allowing changes of awk, perl etc. code used in the build and test to Python code without any such changes needing makefile conditionals or to handle older Python versions. This patch makes the configure test for Python check the version and give an error if Python is missing or too old, and removes makefile conditionals that are no longer needed. It does not itself convert any code from another language to Python, and does not remove any compatibility with older Python versions from existing scripts. Tested for x86_64. * configure.ac (PYTHON_PROG): Use AC_CHECK_PROG_VER. Set critic_missing for versions before 3.4. * configure: Regenerated. * manual/install.texi (Tools for Compilation): Document requirement for Python to build glibc. * INSTALL: Regenerated. * Rules [PYTHON]: Make code unconditional. * benchtests/Makefile [PYTHON]: Likewise. * conform/Makefile [PYTHON]: Likewise. * manual/Makefile [PYTHON]: Likewise. * math/Makefile [PYTHON]: Likewise.
* Use gen-libm-test.py to generate ulps table for manual.Joseph Myers2018-10-243-213/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch extends gen-libm-test.py to generate the ulps table for the manual, so meaning there is only a single ulps file parser needed and another Perl script is eliminated. As with the introduction of gen-libm-test.py, this is designed to generate exactly the same libm-err.texi as libm-err-tab.pl did. (gen-libm-test.py is still shorter in lines than the old gen-libm-test.pl even after this patch.) Note that this introduces a Python dependency for building the manual, which is thus noted in install.texi and NEWS. Tested building html / info / pdf versions of the manual. * math/gen-libm-test.py: Import os. (ALL_FLOATS_MANUAL): New constant. (ALL_FLOATS_SUFFIX): Likewise. (Ulps.all_functions): New function. (real_all_ulps): Likewise. (generate_err_table_sub): Likewise. (generate_err_table): Likewise. (main): Handle -s and -m options. * manual/libm-err-tab.pl: Remove. * manual/Makefile ($(objpfx)stamp-libm-err): Use gen-libm-test.py instead of libm-err-tab.pl. [$(PERL) != no]: Change condition to [$(if $(PYTHON),$(PERL),no) != no]. * manual/install.texi (Tools for Compilation): Document requirement for Python to build manual. * INSTALL: Regenerated.
* [manual] Job control is no longer optional.Zack Weinberg2018-10-172-29/+11
| | | | | | | | | | | | | | | Job control was made mandatory in POSIX.1-2001: compare <http://pubs.opengroup.org/onlinepubs/7990989775/xsh/unistd.h.html> with <http://pubs.opengroup.org/onlinepubs/009695399/basedefs/unistd.h.html>. Seventeen years later, we need not devote an entire manual @node to warning people that this was once an optional POSIX feature. * manual/job.texi (Job Control is Optional): Remove node, as job control has not been optional in quite some time. (Job Control): Mention briefly that systems older than POSIX.1-2001 might not support job control. * manual/conf.texi (_POSIX_JOB_CONTROL): Will always be defined on systems conforming to POSIX.1-2001.
* Don't build libnsl for new ABIsAndreas Schwab2018-09-241-0/+3
| | | | | | For architectures and ABIs that are added in version 2.29 or later the option --enable-obsolete-nsl is no longer available, and no libnsl compatibility library is built.
* Add --with-nonshared-cflags option to configureFlorian Weimer2018-08-171-0/+14
|
* Update install.texi documentation of uses of Perl and Python.Joseph Myers2018-08-131-37/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The install.texi documentation of uses of Perl and Python is substantially out of date. The description of Perl is "to test the installation" (which I interpret as referring to test-installation.pl), but it's used for more tests than that, and to build the manual, and to regenerate one file in the source tree. The description of Python is only for pretty-printer tests, but it's used for other tests / benchmarks as well (and for other internal uses such as updating Unicode data, for which we already require Python 3, but I think install.texi only needs to describe uses from the main glibc Makefiles). This patch updates the descriptions of what those tools are used for. The Python information (and information about other tools for testing pretty printers) was awkwardly in the middle of the general description of building and testing glibc, rather than with the rest of information about tools used in glibc build and test; this patch moves the information about those tools into the main list. Tested with regeneration of INSTALL as well as "make info" and "make pdf". * manual/install.texi (Configuring and compiling): Do not list tools used for testing pretty printers here. (Tools for Compilation): List Python, PExpect and GDB here. Update descriptions of uses of Perl and Python. * INSTALL: Regenerate.
* Add convenience target 'install-locale-files'.Carlos O'Donell2018-08-021-7/+24
| | | | | | | | | The convenience install target 'install-locale-files' is created to allow distributions to install all of the SUPPORTED locales as files instead of into the locale-archive. You invoke the new convenience target like this: make localedata/install-locale-files DESTDIR=<prefix>
* Rename the glibc.tune namespace to glibc.cpuSiddhesh Poyarekar2018-08-022-23/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The glibc.tune namespace is vaguely named since it is a 'tunable', so give it a more specific name that describes what it refers to. Rename the tunable namespace to 'cpu' to more accurately reflect what it encompasses. Also rename glibc.tune.cpu to glibc.cpu.name since glibc.cpu.cpu is weird. * NEWS: Mention the change. * elf/dl-tunables.list: Rename tune namespace to cpu. * sysdeps/powerpc/dl-tunables.list: Likewise. * sysdeps/x86/dl-tunables.list: Likewise. * sysdeps/aarch64/dl-tunables.list: Rename tune.cpu to cpu.name. * elf/dl-hwcaps.c (_dl_important_hwcaps): Adjust. * elf/dl-hwcaps.h (GET_HWCAP_MASK): Likewise. * manual/README.tunables: Likewise. * manual/tunables.texi: Likewise. * sysdeps/powerpc/cpu-features.c: Likewise. * sysdeps/unix/sysv/linux/aarch64/cpu-features.c (init_cpu_features): Likewise. * sysdeps/x86/cpu-features.c: Likewise. * sysdeps/x86/cpu-features.h: Likewise. * sysdeps/x86/cpu-tunables.c: Likewise. * sysdeps/x86_64/Makefile: Likewise. * sysdeps/x86/dl-cet.c: Likewise. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* Update tooling versions verified to work with glibc.Carlos O'Donell2018-07-311-10/+21
|
* Update contrib.texi contributions.Carlos O'Donell2018-07-311-12/+29
|
* Add manual documentation for threads.hRical Jasan2018-07-243-9/+554
| | | | | | | | | | | | This patch updates the manual and adds a new chapter to the manual, explaining types macros, constants and functions defined by ISO C11 threads.h standard. [BZ# 14092] * manual/debug.texi: Update adjacent chapter name. * manual/probes.texi: Likewise. * manual/threads.texi (ISO C Threads): New section. (POSIX Threads): Convert to a section.