summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2014-08-21Remove unnecessary uses of NOT_IN_libcSiddhesh Poyarekar
If a IS_IN_* macro is defined, then NOT_IN_libc is always defined, except obviously for IS_IN_libc. There's no need to check for both. Verified on x86_64 and i686 that the source is unchanged. * include/libc-symbols.h: Remove unnecessary check for NOT_IN_libc. * nptl/pthreadP.h: Likewise. * sysdeps/aarch64/setjmp.S: Likewise. * sysdeps/alpha/setjmp.S: Likewise. * sysdeps/arm/sysdep.h: Likewise. * sysdeps/i386/setjmp.S: Likewise. * sysdeps/m68k/setjmp.c: Likewise. * sysdeps/posix/getcwd.c: Likewise. * sysdeps/powerpc/powerpc32/setjmp-common.S: Likewise. * sysdeps/powerpc/powerpc64/setjmp-common.S: Likewise. * sysdeps/s390/s390-32/setjmp.S: Likewise. * sysdeps/s390/s390-64/setjmp.S: Likewise. * sysdeps/sh/sh3/setjmp.S: Likewise. * sysdeps/sh/sh4/setjmp.S: Likewise. * sysdeps/unix/alpha/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/aarch64/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/i386/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/ia64/setjmp.S: Likewise. * sysdeps/unix/sysv/linux/ia64/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/sh/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/tile/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/x86_64/sysdep.h: Likewise. * sysdeps/x86_64/setjmp.S: Likewise.
2014-08-01Fix -Wundef warnings in regex_internal.hSiddhesh Poyarekar
2014-08-01Fix -Wundef warnings in fnmatch.cSiddhesh Poyarekar
Fixes -Wundef warnings for MBSTATE_T and HAVE_STRING_H. The HAVE_STRING_H bit is a merge from the gnulib fnmatch.c and the MBSTATE_T fix has been posted to gnulib for inclusion.
2014-06-20Clean up HAVE_CONFIG_H and STDC_HEADERS.Roland McGrath
2014-06-20Remove __ASSUME_ATFCTS conditionals in sysdeps/unix/sysv/linux/.Joseph Myers
This patch cleans up for __ASSUME_ATFCTS now always being true for the supported Linux kernel versions by removing conditional code in sysdeps/unix/sysv/linux. Several fchownat.c files that were only present because of differences in the fallback syscalls used (depending on the architecture-specific names of chown-related syscalls for 32-bit uids) are removed. Files that looks like they could be replaced by syscalls.list entries have the standard "Consider moving to syscalls.list." comment (see bug 14138) added. Conditionals on the relevant __NR_* syscall numbers being defined are also removed, since my analysis indicated that the relevant syscalls are always defined for all relevant kernel versions using any affected file. Much of the removed fallback code had unbounded stack allocations, so this reduces the number of cases to consider for anyone reviewing uses of alloca and VLAs in glibc. There remain tests of __ASSUME_ATFCTS in io/openat.c (to determine whether to define __have_atfcts) and sysdeps/posix/getcwd.c (which also uses __have_atfcts); thus, the definition of __ASSUME_ATFCTS remains in kernel-features.h. The logical condition relevant there is whether openat64_not_cancel_3 is known to work. Hurd doesn't use this version of getcwd at all, so the conditionals in getcwd.c are always true in glibc. However, this code is also used in gnulib. So the best way to deal with the conditionals there may be for gnulib people to deal with merging all relevant changes in both directions between the glibc and gnulib versions of this file, at the end of which the openat conditionals should be in whatever form is best for gnulib, and hardcoded in the _LIBC case to having openat supported. Tested by comparing before-and-after disassembly of installed (stripped) shared libraries, on x86_64 and x86. On x86 the patch made no change to the disassembly; on x86_64, the only changes were in readlinkat, where formerly the return value from the readlinkat syscall was stored in an int variable before being converted to ssize_t for the return, and now the return value is returned directly without truncation to int. I think it's clearly correct not to truncate the return value (although I also think the truncation would not have been a user-visible bug because the kernel would never have returned a value it could have affected). * include/fcntl.h (__atfct_seterrno): Remove prototype. (__atfct_seterrno_2): Likewise. * sysdeps/unix/sysv/linux/alpha/dl-fxstatat64.c: Do not include <kernel-features.h>. (__ASSUME_ATFCTS): Do not undefine and redefine. * sysdeps/unix/sysv/linux/alpha/fxstatat.c [__ASSUME_ATFCTS] (__have_atfcts): Remove conditional definition. (__fxstatat([__NR_fstatat64]: Make code unconditional. (__fxstatat) [!__ASSUME_ATFCTS]: Remove conditional code and code unreachable if [__ASSUME_ATFCTS]. * sysdeps/unix/sysv/linux/dl-fxstatat64.c (__ASSUME_ATFCTS): Do not undefine and redefine. * sysdeps/unix/sysv/linux/faccessat.c: Do not include <kernel-features.h>. (faccessat) [__NR_faccessat]: Make code unconditional. (faccessat) [!__ASSUME_ATFCTS]: Remove conditional code. * sysdeps/unix/sysv/linux/fchmodat.c: Do not include <kernel-features.h>. (fchmodat) [__NR_fchmodat]: Make code unconditional. (fchmodat) [!__ASSUME_ATFCTS]: Remove conditional code. * sysdeps/unix/sysv/linux/fchownat.c: Do not include <kernel-features.h>. (fchownat) [__NR_fchownat]: Make code unconditional. (fchownat) [!__ASSUME_ATFCTS]: Remove conditional code. * sysdeps/unix/sysv/linux/futimesat.c: Do not include <kernel-features.h>. (futimesat) [__NR_futimesat]: Make code unconditional. (futimesat) [!__ASSUME_ATFCTS]: Remove conditional code. * sysdeps/unix/sysv/linux/fxstatat.c: Do not include <kernel-features.h>. (__fxstatat) [__NR_newfstatat]: Make code unconditional. (__fxstatat) [!__ASSUME_ATFCTS]: Remove conditional code. * sysdeps/unix/sysv/linux/fxstatat64.c: Do not include <kernel-features.h>. (__fxstatat64) [__NR_fstatat64]: Make code unconditional. (__fxstatat64) [!__ASSUME_ATFCTS]: Remove conditional code. * sysdeps/unix/sysv/linux/i386/fchownat.c: Remove file. * sysdeps/unix/sysv/linux/i386/fxstatat.c: Do not include <kernel-features.h>. (__fxstatat) [__NR_fstatat64]: Make code unconditional. (__fxstatat) [!__ASSUME_ATFCTS]: Remove conditional code. * sysdeps/unix/sysv/linux/linkat.c: Do not include <kernel-features.h>. (linkat) [__NR_linkat]: Make code unconditional. (linkat) [!__ASSUME_ATFCTS]: Remove conditional code. * sysdeps/unix/sysv/linux/m68k/fchownat.c: Remove file. * sysdeps/unix/sysv/linux/mips/mips64/fxstatat64.c: Do not include <kernel-features.h>. (__fxstatat64) [__NR_newfstatat]: Make code unconditional. (__fxstatat64) [!__ASSUME_ATFCTS]: Remove conditional code. * sysdeps/unix/sysv/linux/mkdirat.c: Do not include <kernel-features.h>. (mkdirat) [__NR_mkdirat]: Make code unconditional. (mkdirat) [!__ASSUME_ATFCTS]: Remove conditional code. * sysdeps/unix/sysv/linux/openat.c: Do not include <kernel-features.h>. [!__ASSUME_ATFCTS] (__atfct_seterrno): Remove function. [!__ASSUME_ATFCTS] (__have_atfcts): Remove variable. (OPENAT_NOT_CANCEL) [__NR_openat]: Make code unconditional. (OPENAT_NOT_CANCEL) [!__ASSUME_ATFCTS]: Remove conditional code. * sysdeps/unix/sysv/linux/powerpc/fchownat.c: Remove file. * sysdeps/unix/sysv/linux/readlinkat.c: Do not include <kernel-features.h>. (readlinkat) [__NR_readlinkat]: Make code unconditional. (readlinkat) [!__ASSUME_ATFCTS]: Remove conditional code. Return result of INLINE_SYSCALL directly, not via int variable. * sysdeps/unix/sysv/linux/renameat.c: Do not include <kernel-features.h>. [!__ASSUME_ATFCTS] (__atfct_seterrno_2): Remove function. (renameat) [__NR_renameat]: Make code unconditional. (renameat) [!__ASSUME_ATFCTS]: Remove conditional code. * sysdeps/unix/sysv/linux/s390/s390-32/fchownat.c: Remove file. * sysdeps/unix/sysv/linux/sh/fchownat.c: Remove file. * sysdeps/unix/sysv/linux/sparc/sparc32/fchownat.c: Remove file. * sysdeps/unix/sysv/linux/sparc/sparc64/dl-fxstatat64.c (__ASSUME_ATFCTS): Do not undefine and redefine. * sysdeps/unix/sysv/linux/symlinkat.c: Do not include <kernel-features.h>. (symlinkat) [__NR_symlinkat]: Make code unconditional. (symlinkat) [!__ASSUME_ATFCTS]: Remove conditional code. * sysdeps/unix/sysv/linux/unlinkat.c: Do not include <kernel-features.h>. (unlinkat) [__NR_unlinkat]: Make code unconditional. (unlinkat) [!__ASSUME_ATFCTS]: Remove conditional code. * sysdeps/unix/sysv/linux/wordsize-64/dl-fxstatat64.c (__ASSUME_ATFCTS): Do not undefine and redefine. * sysdeps/unix/sysv/linux/wordsize-64/fxstatat.c: Do not include <kernel-features.h>. (__fxstatat) [__NR_newfstatat]: Make code unconditional. (__fxstatat) [!__ASSUME_ATFCTS]: Remove conditional code. * sysdeps/unix/sysv/linux/xmknodat.c: Do not include <kernel-features.h>. (__xmknodat) [__NR_mknodat]: Make code unconditional. (__xmknodat) [!__ASSUME_ATFCTS]: Remove conditional code.
2014-06-12Get rid of nptl/sysdeps/pthread/ subdirectoryRoland McGrath
2014-05-13Clean up __exit_thread.Roland McGrath
2014-03-14Compile with -Wundef.Roland McGrath
2014-02-25BZ #16632: Change [_BSD/_SVID]_SOURCE warning.Carlos O'Donell
Source packages that need to support both 2.19 and 2.20 will need to decide to use _BSD_SOURCE and _SVID_SOURCE vs. _DEFAULT_SOURCE. The difficulty in making that decision is that __GLIBC_MINOR__ is itself defined in features.h, but you want to set the feature test macros before including features.h. Therefore to ease the transition we should disable the warning if _DEFAULT_SOURCE is also defined. https://sourceware.org/ml/libc-alpha/2014-02/msg00666.html https://sourceware.org/glibc/wiki/Release/2.20#Packaging_Changes
2014-02-19Properly fix memory leak in _nss_dns_gethostbyname4_r with big DNS answerAndreas Schwab
Instead of trying to guess whether the second buffer needs to be freed set a flag at the place it is allocated
2014-02-12Combine __USE_BSD and __USE_SVID into __USE_MISC.Joseph Myers
This patch cleans up following the obsoletion of _BSD_SOURCE and _SVID_SOURCE by combining __USE_BSD and __USE_SVID into __USE_MISC. The only non-mechanical part of this patch is the changes to features.h; everything else is simple substitution of __USE_MISC for the old macros. Thus, this patch leaves obviously redundant conditionals such as "defined __USE_MISC || defined __USE_MISC", and does not update #endif comments where they referred to BSD or SVID in words instead of the literal macro name. This is intended to facilitate patch review by separating the less mechanical changes from these purely mechanical changes into a separate patch. (I do intend to integrate all the changes from <https://sourceware.org/ml/libc-alpha/2013-12/msg00226.html>, which I believe includes all the trailing comment updates, in subsequent patches.) Tested x86_64. * include/features.h (__USE_BSD): Remove macro definitions. (__USE_SVID): Likewise. (_BSD_SOURCE): Likewise. (_SVID_SOURCE): Likewise. [!defined _BSD_SOURCE && !defined _SVID_SOURCE]: Remove condition from definition of _DEFAULT_SOURCE. [_BSD_SOURCE || _SVID_SOURCE]: Change condition to [_DEFAULT_SOURCE]. * bits/fcntl.h [__USE_BSD]: Change condition to [__USE_MISC]. * bits/mman.h [__USE_BSD]: Likewise. * bits/termios.h [__USE_BSD]: Likewise. * bits/waitstatus.h [__USE_BSD]: Likewise. * ctype/ctype.h [__USE_SVID]: Likewise. * dirent/dirent.h [__USE_BSD]: Likewise. * grp/grp.h [__USE_SVID]: Likewise. [__USE_BSD]: Likewise. * inet/netinet/igmp.h [__USE_BSD]: Likewise. * io/fcntl.h [__USE_BSD]: Likewise. * io/ftw.h [__USE_BSD]: Likewise. * io/sys/stat.h [__USE_BSD]: Likewise. * libio/bits/stdio-ldbl.h [__USE_BSD]: Likewise. * libio/bits/stdio2.h [__USE_BSD]: Likewise. * libio/stdio.h [__USE_SVID]: Likewise. [__USE_BSD]: Likewise. * math/math.h [__USE_SVID]: Likewise. [__USE_BSD]: Likewise. * misc/bits/syslog-ldbl.h [__USE_BSD]: Likewise. * misc/bits/syslog.h [__USE_BSD]: Likewise. * misc/search.h [__USE_SVID]: Likewise. * misc/sys/mman.h [__USE_BSD]: Likewise. * misc/sys/syslog.h [__USE_BSD]: Likewise. * misc/sys/uio.h [__USE_BSD]: Likewise. * posix/bits/unistd.h [__USE_BSD]: Likewise. * posix/glob.h [__USE_BSD]: Likewise. * posix/regex.h [__USE_BSD]: Likewise. * posix/sys/types.h [__USE_BSD]: Likewise. [__USE_SVID]: Likewise. * posix/sys/utsname.h [__USE_SVID]: Likewise. * posix/sys/wait.h [__USE_BSD]: Likewise. [__USE_SVID]: Likewise. * posix/unistd.h [__USE_BSD]: Likewise. [__USE_SVID]: Likewise. * pwd/pwd.h [__USE_SVID]: Likewise. * resolv/netdb.h [__USE_BSD]: Likewise. * setjmp/setjmp.h [__USE_BSD]: Likewise. * signal/signal.h [__USE_BSD]: Likewise. [__USE_SVID]: Likewise. * socket/sys/socket.h [__USE_BSD]: Likewise. * stdlib/fmtmsg.h [__USE_SVID]: Likewise. * stdlib/stdlib.h [__USE_BSD]: Likewise. [__USE_SVID]: Likewise. * string/bits/string2.h [__USE_BSD]: Likewise. [__USE_SVID]: Likewise. * string/bits/string3.h [__USE_BSD]: Likewise. * string/endian.h [__USE_BSD]: Likewise. * string/string.h [__USE_SVID]: Likewise. [__USE_BSD]: Likewise. * string/strings.h [__USE_BSD]: Likewise. * sysdeps/generic/netinet/ip.h [__USE_BSD]: Likewise. * sysdeps/gnu/netinet/ip_icmp.h [__USE_BSD]: Likewise. * sysdeps/mach/hurd/bits/fcntl.h [__USE_BSD]: Likewise. * sysdeps/mach/hurd/bits/stat.h [__USE_BSD]: Likewise. * sysdeps/unix/sysv/linux/alpha/bits/mman.h [__USE_BSD]: Likewise. * sysdeps/unix/sysv/linux/alpha/bits/termios.h [__USE_BSD]: Likewise. * sysdeps/unix/sysv/linux/bits/fcntl-linux.h [__USE_BSD]: Likewise. * sysdeps/unix/sysv/linux/bits/mman-linux.h [__USE_BSD]: Likewise. * sysdeps/unix/sysv/linux/bits/sys_errlist.h [__USE_BSD]: Likewise. * sysdeps/unix/sysv/linux/bits/termios.h [__USE_BSD]: Likewise. * sysdeps/unix/sysv/linux/mips/bits/termios.h [__USE_BSD]: Likewise. * sysdeps/unix/sysv/linux/netinet/if_ether.h [__USE_BSD]: Likewise. * sysdeps/unix/sysv/linux/netinet/if_fddi.h [__USE_BSD]: Likewise. * sysdeps/unix/sysv/linux/netinet/if_tr.h [__USE_BSD]: Likewise. * sysdeps/unix/sysv/linux/powerpc/bits/termios.h [__USE_BSD]: Likewise. * sysdeps/unix/sysv/linux/sparc/bits/termios.h [__USE_BSD]: Likewise. * sysdeps/x86/bits/string.h [__USE_BSD]: Likewise. * sysvipc/sys/ipc.h [__USE_SVID]: Likewise. * termios/termios.h [__USE_BSD]: Likewise. * time/sys/time.h [__USE_BSD]: Likewise. * time/time.h [__USE_BSD]: Likewise. [__USE_SVID]: Likewise. * sysdeps/unix/sysv/linux/hppa/bits/mman.h [__USE_BSD]: Change condition to [__USE_MISC].
2014-02-11Remove _BSD_SOURCE and _SVID_SOURCE.Joseph Myers
This is a minimal patch to remove _BSD_SOURCE and _SVID_SOURCE from the documented user API, making them into aliases for _DEFAULT_SOURCE with a #warning given, but keeping most of the features.h logic using those macros and all the exising __USE_* conditionals, on the basis that all the consequent cleanups will go in followup patches. Tested x86_64. * include/features.h: Update comment documenting feature test macros. [_BSD_SOURCE || _SVID_SOURCE]: Give #warning. Define _DEFAULT_SOURCE. * manual/creature.texi (_BSD_SOURCE): Remove documentation. (_SVID_SOURCE): Likewise. (_DEFAULT_SOURCE): Update description of default features. (Feature Test Macros): Don't mention _SVID_SOURCE in conjunction with _GNU_SOURCE. * manual/filesys.texi (__ftw_func_t): Do not refer to _BSD_SOURCE. (S_ISVTX): Likewise. * manual/math.texi (Mathematical Constants): Likewise. * manual/signal.texi (Interrupted Primitives): Likewise. * manual/startup.texi (putenv): Do not refer to _SVID_SOURCE. * math/test-matherr.c (_SVID_SOURCE): Do not define. * sysvipc/sys/ipc.h [__USE_SVID && !__USE_XOPEN && __GNUC__ >= 2]: Don't refer to _SVID_SOURCE in warning text.
2014-02-11include/stap-probe.h: Add comment about SystemTap argument formatWill Newton
Add a comment pointing to the SystemTap wiki page that documents the format of the arguments. Also add a pointer to the SystemTap and gdb sources which seem to be the best place to get the architecture specific details. ChangeLog: 2014-02-11 Will Newton <will.newton@linaro.org> * include/stap-probe.h: Add comment about probe argument format.
2014-02-10Use glibc_likely instead __builtin_expect.Ondřej Bílka
2014-02-07Avoid comma operator warnings.Roland McGrath
2014-02-07Update version.h and include/features.h for 2.19 releaseglibc-2.19Allan McRae
2014-01-01Update copyright notices with scripts/update-copyrightsAllan McRae
2013-12-19Add _DEFAULT_SOURCE feature test macro.Joseph Myers
This patch adds a feature test macro _DEFAULT_SOURCE to enable the default set of header declarations. The intention is: if _DEFAULT_SOURCE is not used there is no change to the set of __USE_* macros glibc defines; if it's used on its own, and without compiler options such as -std=c99 that define __STRICT_ANSI__, again, there is no change; if it's used together with the macros it approximately (i.e., apart from __USE_POSIX_IMPLICITLY) implies (-D_BSD_SOURCE -D_SVID_SOURCE -D_POSIX_C_SOURCE=200809L), again, there is no change. Otherwise, it causes the relevant features to be enabled, even if __STRICT_ANSI__, or another feature test macro, would cause them to be disabled. This macro deliberately bundles the POSIX.1-2008 (non-X/Open) functionality with the BSD/SVID/"misc" functionality, rather than defining a macro that gives just the latter, as many of the header cleanups resulting from removing _BSD_SOURCE and _SVID_SOURCE support are only possible when BSD/SVID/"misc" is always bundled with POSIX.1-2008. Tested x86_64. * include/features.h: Update comment documenting feature test macros. Mention _DEFAULT_SOURCE in comment. [_GNU_SOURCE] (_DEFAULT_SOURCE): Undefine and redefine. [_DEFAULT_SOURCE]: Undefine and redefine _DEFAULT_SOURCE, _BSD_SOURCE and _SVID_SOURCE. [!__STRICT_ANSI__ && !_ISOC99_SOURCE && !_POSIX_SOURCE && !_POSIX_C_SOURCE && !_XOPEN_SOURCE && !_BSD_SOURCE && !_SVID_SOURCE]: Likewise. [_DEFAULT_SOURCE && !_POSIX_SOURCE && !_POSIX_C_SOURCE] (__USE_POSIX_IMPLICITLY): Define. [_DEFAULT_SOURCE && !_POSIX_SOURCE && !_POSIX_C_SOURCE] (_POSIX_SOURCE): Undefine and redefine. [_DEFAULT_SOURCE && !_POSIX_SOURCE && !_POSIX_C_SOURCE] (_POSIX_C_SOURCE): Likewise. * manual/creature.texi (_DEFAULT_SOURCE): Document. (Feature Test Macros): Update documentation of default features.
2013-12-17Remove __FAVOR_BSD.Joseph Myers
2013-12-03[BZ #16195] Fix build warnings from systemtap probes in non-systemtap ↵Siddhesh Poyarekar
configurations Joseph pointed out in the bug report (and in an earlier thread) that systemtap probes cause build time warnings like the following: ../sysdeps/ieee754/dbl-64/e_atan2.c:602:4: warning: the address of 'p' will always evaluate as 'true' [-Waddress] due to the fact that we're now passing non-weak variables to LIBC_PROBE in the libm probes. This happens only on configurations that do not enable systemtap. The macro definition of LIBC_PROBE in this case only acts as a sanity checker to ensure that the number parameters passed to LIBC_PROBE is equal to the argument count parameter passed before it. This can be done in a much simpler manner by just adding a macro definition for each number of arguments. I am assuming here that we don't really want to bother with supporting LIBC_PROBE with an indeterminate number of arguments and if there is a need for a probe to have more data than what is currently supported (4 arguments), one could simply add an additional macro here.
2013-11-28Fix dbl-64 e_sqrt.c for non-default rounding modes (bug 16271).Joseph Myers
2013-11-18Define TLS version of libc_hidden_proto.Joseph Myers
2013-11-04Define __STDC_IEC_559* based on __GCC_IEC_559*.Joseph Myers
2013-09-20Make __ffs hiddenAndreas Schwab
2013-09-04conformtest: Fix namespace testing.Joseph Myers
2013-09-04Remove --disable-versioning.Joseph Myers
2013-08-27Clean up h_errno declaration to use __thread unconditionally.Roland McGrath
2013-08-27Clean up _res declaration to use __thread unconditionally.Roland McGrath
2013-08-10Update version.h and include/features.h for 2.18 release.glibc-2.18David S. Miller
2013-06-24libc-internal.h: add ALIGN helper macrosMike Frysinger
Rather than open coding the masks, add helper macros to do the magic. This makes code easier to read. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-06-20Fix loop construction to functions callsAdhemerval Zanella
Check wheter the compiler has the option -fno-tree-loop-distribute-patterns to inhibit loop transformation to library calls and uses it on memset and memmove default implementation to avoid recursive calls.
2013-06-12Set/restore rounding mode only when neededSiddhesh Poyarekar
The most common use case of math functions is with default rounding mode, i.e. rounding to nearest. Setting and restoring rounding mode is an unnecessary overhead for this, so I've added support for a context, which does the set/restore only if the FP status needs a change. The code is written such that only x86 uses these. Other architectures should be unaffected by it, but would definitely benefit if the set/restore has as much overhead relative to the rest of the code, as the x86 bits do. Here's a summary of the performance improvement due to these improvements; I've only mentioned functions that use the set/restore and have benchmark inputs for x86_64: Before: cos(): ITERS:4.69335e+08: TOTAL:28884.6Mcy, MAX:4080.28cy, MIN:57.562cy, 16248.6 calls/Mcy exp(): ITERS:4.47604e+08: TOTAL:28796.2Mcy, MAX:207.721cy, MIN:62.385cy, 15543.9 calls/Mcy pow(): ITERS:1.63485e+08: TOTAL:28879.9Mcy, MAX:362.255cy, MIN:172.469cy, 5660.86 calls/Mcy sin(): ITERS:3.89578e+08: TOTAL:28900Mcy, MAX:704.859cy, MIN:47.583cy, 13480.2 calls/Mcy tan(): ITERS:7.0971e+07: TOTAL:28902.2Mcy, MAX:1357.79cy, MIN:388.58cy, 2455.55 calls/Mcy After: cos(): ITERS:6.0014e+08: TOTAL:28875.9Mcy, MAX:364.283cy, MIN:45.716cy, 20783.4 calls/Mcy exp(): ITERS:5.48578e+08: TOTAL:28764.9Mcy, MAX:191.617cy, MIN:51.011cy, 19071.1 calls/Mcy pow(): ITERS:1.70013e+08: TOTAL:28873.6Mcy, MAX:689.522cy, MIN:163.989cy, 5888.18 calls/Mcy sin(): ITERS:4.64079e+08: TOTAL:28891.5Mcy, MAX:6959.3cy, MIN:36.189cy, 16062.8 calls/Mcy tan(): ITERS:7.2354e+07: TOTAL:28898.9Mcy, MAX:1295.57cy, MIN:380.698cy, 2503.7 calls/Mcy So the improvements are: cos: 27.9089% exp: 22.6919% pow: 4.01564% sin: 19.1585% tan: 1.96086% The downside of the change is that it will have an adverse performance impact on non-default rounding modes, but I think the tradeoff is justified.
2013-06-11Fix indentation and add copyright header to time.hSiddhesh Poyarekar
2013-06-11Fix symbol definitions for __clock_* functionsSiddhesh Poyarekar
__clock_gettime and other __clock_* functions could result in an extra PLT reference within libc.so if it actually gets used. None of the code currently uses them, which is why this probably went unnoticed.
2013-06-07Avoid use of "register" as optimization hint.Joseph Myers
2013-06-06Fix leading whitespaces.Ondrej Bilka
2013-05-16Add #include <stdint.h> for uint[32|64]_t usage (except installed headers).Ryan S. Arnold
2013-04-02New <math.h> macro named issignaling to check for a signaling NaN (sNaN).Thomas Schwinge
It is based on draft TS 18661 and currently enabled as a GNU extension.
2013-03-28Avoid unconditional __call_tls_dtors calls in static linking.Roland McGrath
2013-02-18sys/cdefs.h: export __attribute_alloc_size__Mike Frysinger
Since we want to use this in installed headers, move it to the installed sys/cdefs.h. This requires a slight tweaking of the name (add trailing underscores). Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-02-18unify xmalloc prototypes & friendsMike Frysinger
These prototypes are duplicated in many places. Add a dedicated header for holding prototypes for program-specific functions to avoid that. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-02-18C++11 thread_local destructors supportSiddhesh Poyarekar
This feature is specifically for the C++ compiler to offload calling thread_local object destructors on thread program exit, to glibc. This is to overcome the possible complication of destructors of thread_local objects getting called after the DSO in which they're defined is unloaded by the dynamic linker. The DSO is marked as 'unloadable' if it has a constructed thread_local object and marked as 'unloadable' again when all the constructed thread_local objects defined in it are destroyed.
2013-02-13Remove __ptrvalue, __bounded and __unbounded.Joseph Myers
2013-02-12Remove redunant "warning: " prefix from stub warnings.Roland McGrath
2013-02-07Remove lots of inline keywords.Roland McGrath
2013-02-04Don't use GLIBC_PRIVATE errno outside of librariesAndreas Schwab
2013-02-02Improve link_map.l_addr comment.Jan Kratochvil
2013-01-17Fix cacos real-part inaccuracy for result real part near 0 (bug 15023).Joseph Myers
2013-01-16Hide reference to mktemp in libpthreadAndreas Schwab
2013-01-11Remove __GLIBC_HAVE_LONG_LONG.Joseph Myers