mirror of
git://sourceware.org/git/glibc.git
synced 2026-09-09 11:58:23 +08:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f7ba66b61f |
@@ -0,0 +1,69 @@
|
||||
List of known bugs (certainly very incomplete)
|
||||
----------------------------------------------
|
||||
|
||||
Time-stamp: <2007-10-27 18:37:51 drepper>
|
||||
|
||||
This following list contains those bugs which I'm aware of. Please
|
||||
make sure that bugs you report are not listed here. If you can fix one
|
||||
of these bugs/limitations I'll certainly be glad to receive a patch.
|
||||
|
||||
Another source of information about bugs is the problem data base of the
|
||||
GNU project. There is an easy to use WWW interface available at
|
||||
|
||||
http://sourceware.org/bugzilla/
|
||||
|
||||
I would appreciate it very much if you could verify the problem was
|
||||
not reported before by looking through the database. Before reporting
|
||||
a bug please check the FAQ since it discusses also a lot of
|
||||
problematic situations.
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Severity: [ *] to [***]
|
||||
|
||||
[ **] Closing shared objects in statically linked binaries most of the
|
||||
times leads to crashes during the dlopen(). Hard to fix.
|
||||
|
||||
[ **] The RPC code is not 64 bit clean. This is getting slowly fixed
|
||||
but expect incompatible changes on 64 bit platforms like Alpha.
|
||||
|
||||
[ *] The precision of the `sinhl' and/or `asinhl' function do not seem
|
||||
to be the best.
|
||||
|
||||
[ *] On Linux, there should be a way to prevent defining the symbol
|
||||
NGROUPS_MAX in the <linux/limits.h> header file. In glibc it
|
||||
is defined in <posix1_lim.h> which must not make the other
|
||||
symbols in <linux/limits.h> available.
|
||||
[PR libc/140]
|
||||
|
||||
[ *] The libm-ieee `gamma' function gives wrong results (at least for
|
||||
-0.5).
|
||||
|
||||
[ *] The libm-ieee `scalb' function gives wrong results for
|
||||
non-integral second parameters.
|
||||
|
||||
[ *] Several (most?) collation specifications are broken. The code which
|
||||
is currently there is in most cases inherited from the originial
|
||||
author (in case there is a LC_COLLATE specification in the locale
|
||||
file) or is defined using the default (if iso14651_t1 is included).
|
||||
|
||||
In any case we are missing information to correct the specification.
|
||||
If you find the specification for your language be faulty please
|
||||
send a report with instruction on what to fix. You don't have to
|
||||
fix the specification yourself.
|
||||
|
||||
The way it finally should look like (if the generic specification
|
||||
is not correct) can be seen in the sv_SE file. Quite a few changes
|
||||
on top of the generic specification can be made without duplication
|
||||
of the whole LC_COLLATE description.
|
||||
|
||||
[ *] Some of the functions which also handled IPv6 are currently broken.
|
||||
IPv6 and IPv4 lookups occasionally happen when not needed. This
|
||||
happens in getaddrinfo() and getnameinfo(). IPv4 handling of
|
||||
these functions is OK though and there are patches available to fix
|
||||
the IPv6 code as well.
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Ulrich Drepper
|
||||
drepper@redhat.com
|
||||
+168
@@ -0,0 +1,168 @@
|
||||
Conformance of the GNU libc with various standards
|
||||
==================================================
|
||||
|
||||
The GNU libc is designed to be conformant with existing standard as
|
||||
far as possible. To ensure this I've run various tests. The results
|
||||
are presented here.
|
||||
|
||||
|
||||
Open Group's hdrchk
|
||||
===================
|
||||
|
||||
The hdrchk test suite is available from the Open Group at
|
||||
|
||||
ftp://ftp.rdg.opengroup.org/pub/unsupported/stdtools/hdrchk/
|
||||
|
||||
I've last run the suite on 2004-04-17 on a Linux/x86 system running
|
||||
a Fedora Core 2 test 2 + updates with the following results [*]:
|
||||
|
||||
FIPS No reported problems
|
||||
|
||||
POSIX90 No reported problems
|
||||
|
||||
XPG3 Prototypes are now in the correct header file
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
*** Starting unistd.h
|
||||
Missing: extern char * cuserid();
|
||||
Missing: extern int rename();
|
||||
*** Completed unistd.h
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
XPG4 Prototype is now in the correct header file
|
||||
and the _POSIX2_C_VERSION symbol has been removed
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
*** Starting unistd.h
|
||||
Missing: extern char * cuserid();
|
||||
Missing: #define _POSIX2_C_VERSION (-1L)
|
||||
*** Completed unistd.h
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
POSIX96 Prototype moved
|
||||
(using "base realtime threads" subsets)
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
*** Starting unistd.h
|
||||
Missing: extern int pthread_atfork();
|
||||
*** Completed unistd.h
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
UNIX98 Prototypes moved and _POSIX2_C_VERSION removed
|
||||
(using "base realtime threads mse lfs" subset)
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
*** Starting unistd.h
|
||||
Missing: extern char * cuserid();
|
||||
Missing: #define _POSIX2_C_VERSION (-1L)
|
||||
Missing: extern int pthread_atfork();
|
||||
*** Completed unistd.h
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
That means all the reported issues are due to the headers having been
|
||||
cleaned up for recent POSIX/Unix specification versions. Duplicated
|
||||
prototypes have been removed and obsolete symbols have been removed.
|
||||
Which means that as far as the tests performed by the script go, the
|
||||
headers files comply to the current POSIX/Unix specification.
|
||||
|
||||
|
||||
[*] Since the scripts are not clever enough for the way gcc handles
|
||||
include files (namely, putting some of them in gcc-local directory) I
|
||||
copied over the iso646.h, float.h, and stddef.h headers and ignored the
|
||||
problems resulting from the split limits.h file).
|
||||
|
||||
|
||||
Technical C standards conformance issues in glibc
|
||||
=================================================
|
||||
|
||||
If you compile programs against glibc with __STRICT_ANSI__ defined
|
||||
(as, for example, by gcc -ansi, gcc -std=c89, gcc -std=iso1990:199409
|
||||
or gcc -std=c99), and use only the headers specified by the version of
|
||||
the C standard chosen, glibc will attempt to conform to that version
|
||||
of the C standard (as indicated by __STDC_VERSION__):
|
||||
|
||||
GCC options Standard version
|
||||
-ansi ISO/IEC 9899:1990
|
||||
-std=c89 ISO/IEC 9899:1990
|
||||
-std=iso9899:199409 ISO/IEC 9899:1990 as amended by Amd.1:1995
|
||||
-std=c99 ISO/IEC 9899:1999
|
||||
|
||||
(Note that -std=c99 is not available in GCC 2.95.2, and that no
|
||||
version of GCC presently existing implements the full C99 standard.)
|
||||
|
||||
You may then define additional feature test macros to enable the
|
||||
features from other standards, and use the headers defined in those
|
||||
standards (for example, defining _POSIX_C_SOURCE to be 199506L to
|
||||
enable features from ISO/IEC 9945-1:1996).
|
||||
|
||||
There are some technical ways in which glibc is known not to conform
|
||||
to the supported versions of the C standard, as detailed below. Some
|
||||
of these relate to defects in the standard that are expected to be
|
||||
fixed, or to compiler limitations.
|
||||
|
||||
|
||||
Defects in the C99 standard
|
||||
===========================
|
||||
|
||||
Some defects in C99 were corrected in Technical Corrigendum 1 to that
|
||||
standard. glibc follows the corrected specification.
|
||||
|
||||
|
||||
Implementation of library functions
|
||||
===================================
|
||||
|
||||
The implementation of some library functions does not fully follow the
|
||||
standard specification:
|
||||
|
||||
C99 added additional forms of floating point constants (hexadecimal
|
||||
constants, NaNs and infinities) to be recognised by strtod() and
|
||||
scanf(). The effect is to change the behavior of some strictly
|
||||
conforming C90 programs; glibc implements the C99 versions only
|
||||
irrespective of the standard version selected.
|
||||
|
||||
C99 added %a as another scanf format specifier for floating point
|
||||
values. This conflicts with the glibc extension where %as, %a[ and
|
||||
%aS mean to allocate the string for the data read. A strictly
|
||||
conforming C99 program using %as, %a[ or %aS in a scanf format string
|
||||
will misbehave under glibc if it does not include <stdio.h> and
|
||||
instead declares scanf itself; if it gets the declaration of scanf
|
||||
from <stdio.h>, it will use a C99-conforming version.
|
||||
|
||||
|
||||
Compiler limitations
|
||||
====================
|
||||
|
||||
The macros __STDC_IEC_559__, __STDC_IEC_559_COMPLEX__ and
|
||||
__STDC_ISO_10646__ are properly supposed to be constant throughout the
|
||||
translation unit (before and after any library headers are included).
|
||||
However, they mainly relate to library features, and GCC only knows to
|
||||
preinclude <stdc-predef.h> to get their definitions in version 4.8 and
|
||||
later. Programs that test them before including any standard headers
|
||||
may misbehave with older compilers.
|
||||
|
||||
GCC doesn't support the optional imaginary types. Nor does it
|
||||
understand the keyword _Complex before GCC 3.0. This has the
|
||||
corresponding impact on the relevant headers.
|
||||
|
||||
glibc's <tgmath.h> implementation is arcane but thought to work
|
||||
correctly; a clean and comprehensible version requires compiler
|
||||
builtins.
|
||||
|
||||
For most of the headers required of freestanding implementations,
|
||||
glibc relies on GCC to provide correct versions. (At present, glibc
|
||||
provides <stdint.h>, and GCC doesn't before version 4.5.)
|
||||
|
||||
The definition of math_errhandling conforms so long as no translation
|
||||
unit using math_errhandling is compiled with -fno-math-errno,
|
||||
-fno-trapping-math or options such as -ffast-math that imply these
|
||||
options. math_errhandling is only conditionally defined depending on
|
||||
__FAST_MATH__; the compiler does not provide the information needed
|
||||
for more exact definitions based on settings of -fno-math-errno and
|
||||
-fno-trapping-math, possibly for only some source files in a program.
|
||||
|
||||
|
||||
Issues with headers
|
||||
===================
|
||||
|
||||
None known.
|
||||
@@ -226,7 +226,7 @@ Thu Jul 30 15:42:01 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
|
||||
* misc/getusersh.c (okshells): Make const.
|
||||
(initshells): Properly declare static.
|
||||
|
||||
* sysdeps/unix/bsd/__tcgetatr.c: Cast sg_[io]speed to (unsigned char)
|
||||
* sysdeps/unix/bsd/__tcgetatr.c: Cast sg_[io]speed to (unsigned char)
|
||||
to avoid gcc warnings.
|
||||
|
||||
* math/bsd/common/atan2.c, math/bsd/common/tan.c,
|
||||
@@ -2631,7 +2631,7 @@ Tue Oct 8 15:27:54 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu)
|
||||
|
||||
* Version 0.1.
|
||||
* This ChangeLog is lacking much information.
|
||||
* After this release, I hope to maintain the log well.
|
||||
* After this release, I hope to maintain the log well.
|
||||
|
||||
Fri Jul 26 18:02:57 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
|
||||
|
||||
@@ -370,7 +370,7 @@ Fri Dec 17 01:18:27 1993 Michael I Bushnell (mib@geech.gnu.ai.mit.edu)
|
||||
* Made the Hurd error system 0x10 again; this undid many
|
||||
of the changes of Nov 23. Affected all the err_ files in
|
||||
mach; recreated sysdeps/hurd/err_hurd.sub; changed back
|
||||
err_kern.sub to have the Unix error codes.
|
||||
err_kern.sub to have the Unix error codes.
|
||||
|
||||
Thu Dec 16 15:40:25 1993 Brendan Kehoe (brendan@zen.org)
|
||||
|
||||
@@ -517,7 +517,7 @@ Mon Nov 29 16:21:38 1993 Michael I Bushnell (mib@geech.gnu.ai.mit.edu)
|
||||
|
||||
* sysdeps/mach/_strerror.c: Include <mach/errorlib.h>.
|
||||
|
||||
* hurd/setuids.c: Put entire file inside #ifndef MIB_HACKS;
|
||||
* hurd/setuids.c: Put entire file inside #ifndef MIB_HACKS;
|
||||
it uses the old auth_makeauth call.
|
||||
|
||||
* hurd/__setauth.c: Put entire file inside #ifndef MIB_HACKS;
|
||||
@@ -532,7 +532,7 @@ Wed Nov 24 00:59:15 1993 Michael I Bushnell (mib@geech.gnu.ai.mit.edu)
|
||||
|
||||
* mach/mach_error_string.c (do_compat): Change name to
|
||||
__mach_error_map_compat; make it no longer static.
|
||||
(mach_error_type, mach_error_string_int): Use
|
||||
(mach_error_type, mach_error_string_int): Use
|
||||
__mach_error_map_compat instead of do_compat.
|
||||
* sysdeps/mach/_strerror.c: Use __mach_error_map_compat.
|
||||
|
||||
@@ -551,7 +551,7 @@ Tue Nov 23 23:16:13 1993 Michael I Bushnell (mib@geech.gnu.ai.mit.edu)
|
||||
they are meaningful in our environment. The files have been
|
||||
renamed to equivalent names with an equal sign prepended; this
|
||||
will inhibit distribution and prevent the Makefile from looking at
|
||||
them.
|
||||
them.
|
||||
* mach/err_kern.sub: Deleted the definitios of err_codes_unix;
|
||||
get the strings from _sys_errlist. Rename `unix' to `hurd'.
|
||||
Rename err_os_sub to be err_kern_sub to match what errsystems.awk
|
||||
@@ -577,7 +577,7 @@ Tue Nov 23 12:43:38 1993 Michael I. Bushnell (mib at ernst.gnu.ai.mit.edu)
|
||||
|
||||
* mach/errsystems.awk: $i is not an index; make i a variable and
|
||||
increment it properly. Don't call `err_get_system'; use the
|
||||
system number as the index in the array directly.
|
||||
system number as the index in the array directly.
|
||||
|
||||
* mach/errorlib.h: Added `const' in all the right places.
|
||||
* sysdeps/mach/hurd/err_hurd.sub: Cast _sys_errlist to
|
||||
@@ -604,8 +604,8 @@ Tue Nov 23 12:43:38 1993 Michael I. Bushnell (mib at ernst.gnu.ai.mit.edu)
|
||||
* mach/errsystems.awk: The array that split creates is origin 1,
|
||||
not origin 0; fixed loop to match.
|
||||
|
||||
* sysdeps/mach/hurd/errnos.awk: Ernst's awk doesn't grok
|
||||
backslash-newline inside strings.
|
||||
* sysdeps/mach/hurd/errnos.awk: Ernst's awk doesn't grok
|
||||
backslash-newline inside strings.
|
||||
|
||||
Sat Nov 20 19:02:25 1993 Brendan Kehoe (brendan@zen.org)
|
||||
|
||||
@@ -757,7 +757,7 @@ Tue Oct 26 18:19:34 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
|
||||
|
||||
* sysdeps/unix/sysv/sco3.2.4/__sysconf.S: Don't include <limits.h>.
|
||||
|
||||
* Makerules [inhibit-sysdep-asm]
|
||||
* Makerules [inhibit-sysdep-asm]
|
||||
(open-check-inhibit-asm, close-check-inhibit-asm): New variables.
|
||||
($(+sysdir_pfx)sysd-rules): Use them around .s and .S rules.
|
||||
Depend on existing sysdep makefiles.
|
||||
@@ -1326,7 +1326,7 @@ Mon May 31 21:49:04 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
|
||||
|
||||
Sun May 30 20:04:50 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
|
||||
|
||||
* sysdeps/posix/stdio_init.c: (int)cookie is FD, not *(int*)cookie.
|
||||
* sysdeps/posix/stdio_init.c: (int)cookie is FD, not *(int*)cookie.
|
||||
|
||||
* time/Makefile ($({localtime,posixrules}-file)): Don't pass -d
|
||||
switch (no need, since directory is compiled into zic). Don't use
|
||||
@@ -1466,7 +1466,7 @@ Mon May 24 16:49:54 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
|
||||
Use $(<D) for directory to pass zic.
|
||||
|
||||
* Makerules (installdirs): Use `sort' function to uniquize list of
|
||||
directories.
|
||||
directories.
|
||||
|
||||
* time/Makefile (install-others): Use $(datadir)/zoneinfo, not
|
||||
$(datadir)zoneinfo (missing /).
|
||||
@@ -2324,7 +2324,7 @@ Fri Apr 16 12:24:21 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
|
||||
* stdio/ungetc.c: Test STREAM->__pushed_back before flushing the
|
||||
STREAM if it's writable.
|
||||
|
||||
* posix/glob.c, posix/fnmatch.c: Surround code with
|
||||
* posix/glob.c, posix/fnmatch.c: Surround code with
|
||||
#if defined (_LIBC) || !defined (__GNU_LIBRARY__)
|
||||
|
||||
Thu Apr 15 19:35:59 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
|
||||
@@ -2571,7 +2571,7 @@ Thu Mar 25 13:40:17 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
|
||||
* Rules (all): Depend on others.
|
||||
|
||||
* time/Makefile (zonenames): Change target to $(objpfx)zonenames.
|
||||
Make the generated file prepend $(objpfx) to
|
||||
Make the generated file prepend $(objpfx) to
|
||||
Include that instead of zonenames.
|
||||
(zones-%): Change target to $(objpfx)zones-%.
|
||||
|
||||
@@ -134,7 +134,7 @@ Thu May 26 12:09:51 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
|
||||
_hurd_dtablesize is as big as _hurd_dtable_rlimit, then return
|
||||
EMFILE. When growing _hurd_dtable, actually do something if
|
||||
_hurd_dtablesize is zero.
|
||||
|
||||
|
||||
* hurd/hurdmalloc.c (malloc_fork_prepare, malloc_fork_parent,
|
||||
malloc_fork_child): Declare as static so they don't conflict with
|
||||
the user's version of this file.
|
||||
@@ -227,12 +227,12 @@ Mon May 23 14:24:50 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
|
||||
is D, not FD.
|
||||
|
||||
* hurd/alloc-fd.c (_hurd_alloc_fd): Arg FIRST_FD is not actually
|
||||
const.
|
||||
const.
|
||||
* hurd/hurdsig.c (_hurd_internal_post_signal [case SIGINFO]): If
|
||||
we are not the process group leader, ignore the signal.
|
||||
(_S_sig_post [case SIGURG]): Declaration of D was out of place.
|
||||
|
||||
* sysdeps/mach/hurd/fdopen.c: Include <hurd/io.h> for
|
||||
* sysdeps/mach/hurd/fdopen.c: Include <hurd/io.h> for
|
||||
io_get_openmodes prototype.
|
||||
|
||||
Sat May 21 16:03:23 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
|
||||
@@ -425,13 +425,13 @@ Wed May 18 17:54:00 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
|
||||
Tue May 17 12:46:31 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
|
||||
|
||||
* mach/mach/mach_traps.h (__mach_reply_port, __mach_thread_self,
|
||||
__mach_task_self, __mach_host_self): New declarations of __
|
||||
__mach_task_self, __mach_host_self): New declarations of __
|
||||
versions of syscall traps.
|
||||
(swtch, __swtch, swtch_pri, __swtch_pri, thread_switch,
|
||||
__thread_switch, evc_wait, __evc_wait): New prototypes.
|
||||
* mach/Makefile (headers): Added mach/mach_traps.h so that the
|
||||
GNU version is installed instead of the Mach version.
|
||||
|
||||
|
||||
Mon May 16 15:34:12 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
|
||||
|
||||
* sysdeps/stub/sys/param.h: New file.
|
||||
@@ -543,7 +543,7 @@ Wed May 11 18:49:31 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
|
||||
* hurd/hurd/signal.h (struct hurd_sigstate): Add new
|
||||
`critical_section' member. Remove #if 0'd out vfork crap.
|
||||
(_hurd_critical_section_lock, _hurd_critical_section_unlock): New
|
||||
functions.
|
||||
functions.
|
||||
(HURD_CRITICAL_BEGIN, HURD_CRITICAL_END): New macros.
|
||||
|
||||
* io/Makefile (headers): Add poll.h and sys/poll.h.
|
||||
@@ -564,7 +564,7 @@ Wed May 11 18:49:31 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
|
||||
|
||||
Wed May 11 13:44:33 1994 Michael I Bushnell (mib@geech.gnu.ai.mit.edu)
|
||||
|
||||
* hurd/hurd/threadvar.h (__hurd_errno_location): Remove
|
||||
* hurd/hurd/threadvar.h (__hurd_errno_location): Remove
|
||||
__volatile keyword. `volatile int errno' is not the same
|
||||
as `int errno'; user programs often mention the latter.
|
||||
* errno.h: Remove __volatile keyword; same reason.
|
||||
@@ -648,10 +648,10 @@ Wed May 4 14:02:29 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
|
||||
* sysdeps/mach/hurd/__getitmr.c: Corresponding changes from
|
||||
mutex calls to spin lock calls here too.
|
||||
|
||||
* sysdeps/mach/hurd/__setitmr.c (setitimer_locked): Fixed syntax
|
||||
* sysdeps/mach/hurd/__setitmr.c (setitimer_locked): Fixed syntax
|
||||
of declaration of PREEMPT.
|
||||
(setitimer_locked): Declare variables ERR and ELAPSED.
|
||||
(setitimer_locked): Fix some references to REMAINING that
|
||||
(setitimer_locked): Fix some references to REMAINING that
|
||||
were using it as an itimerval instead of a timeval.
|
||||
(setitimer_locked): Deleted unused label STILLBORN.
|
||||
|
||||
@@ -750,7 +750,7 @@ Thu Apr 28 21:29:47 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
|
||||
|
||||
* Merged gmp-1.99.3+ mpn code from tege for printf_fp.
|
||||
* stdio/printf_fp.c: Include "longlong.h"; gmp-impl.h no longer does.
|
||||
|
||||
|
||||
* Makerules (+depfiles): Filter $(extra-objs) to get only .o files.
|
||||
|
||||
Wed Apr 27 00:20:41 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
|
||||
@@ -760,7 +760,7 @@ Wed Apr 27 00:20:41 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
|
||||
|
||||
Tue Apr 26 20:05:55 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
|
||||
|
||||
* sysdeps/unix/bsd/bsd4.4/tcdrain.c: Don't include <termios.h> to
|
||||
* sysdeps/unix/bsd/bsd4.4/tcdrain.c: Don't include <termios.h> to
|
||||
avoid <sys/ioctl.h> conflicts.
|
||||
* sysdeps/unix/bsd/bsd4.4/tcsetattr.c: Undefine ECHO, MDMBUF,
|
||||
TOSTOP, FLUSHO, PENDIN, and NOFLSH after including <termios.h> and
|
||||
@@ -838,7 +838,7 @@ Mon Apr 11 17:36:59 1994 Michael I Bushnell (mib@churchy.gnu.ai.mit.edu)
|
||||
|
||||
* sysdeps/mach/hurd/start.c (start1): Bother to set __environ.
|
||||
|
||||
* sysdeps/mach/hurd/__ioctl.c (__ioctl): Comment out use of
|
||||
* sysdeps/mach/hurd/__ioctl.c (__ioctl): Comment out use of
|
||||
HURD_EINTR_RPC until signals work.
|
||||
|
||||
Mon Apr 11 14:16:40 1994 Michael I Bushnell (mib@geech.gnu.ai.mit.edu)
|
||||
@@ -854,7 +854,7 @@ Mon Apr 11 14:16:40 1994 Michael I Bushnell (mib@geech.gnu.ai.mit.edu)
|
||||
needs to be allocated with ANYWHERE cleared.
|
||||
|
||||
* (This change occurred on April 8, 1994) hurd/hurdexec.c
|
||||
(_hurd_exec): The arguments to exec_exec had the length and
|
||||
(_hurd_exec): The arguments to exec_exec had the length and
|
||||
type parameters transposed. In addition, fetch the correct
|
||||
procserver port for the new task.
|
||||
|
||||
@@ -1425,7 +1425,7 @@ Wed Feb 2 16:56:29 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
|
||||
* sysdeps/unix/sysv/sco3.2.4/sigsuspend.S: Moved to unix/sysv/sysv4.
|
||||
Replaced with #include of that file.
|
||||
|
||||
* sysdeps/unix/sysv/sysv4/solaris2/sigaltstack.S: Moved to
|
||||
* sysdeps/unix/sysv/sysv4/solaris2/sigaltstack.S: Moved to
|
||||
sysdeps/unix/sysv/sysv4/sigaltstk.S.
|
||||
|
||||
* sysdeps/unix/sysv/sysv4/i386/__lstat.S: Syscall lxstat, not xlstat.
|
||||
@@ -1466,7 +1466,7 @@ Mon Jan 31 19:33:04 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
|
||||
* sysdeps/unix/sparc/sysdep.S: New file.
|
||||
|
||||
* sysdeps/unix/sysv/sysv4/i386/__vfork.S: New file, just #include
|
||||
unix/bsd/i386 version.
|
||||
unix/bsd/i386 version.
|
||||
|
||||
* sysdeps/unix/bsd/i386/__vfork.S: Use `scratch' in place of %edx.
|
||||
|
||||
@@ -117,7 +117,7 @@ Fri Dec 9 00:01:21 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
|
||||
* sysdeps/mach/hurd/i386/trampoline.c: Likewise.
|
||||
* hurd/preempt-sig.c: Likewise.
|
||||
|
||||
* configure.in (machine): Don't recognize r[34]00.
|
||||
* configure.in (machine): Don't recognize r[34]00.
|
||||
Convert mips64* to mips/mips64/& and mips* to mips/&.
|
||||
* sysdeps/mips/mipsel/bytesex.h: New file.
|
||||
* sysdeps/mips/r4000: Directory renamed to sysdeps/mips/mips64.
|
||||
@@ -254,7 +254,7 @@ Sun Dec 4 12:06:36 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
|
||||
__FAVOR_BSD.
|
||||
[__OPTIMIZE__] (longjmp): Remove #define.
|
||||
[__USE_BSD] (_longjmp): Declare it, another name for `longjmp'.
|
||||
[__USE_BSD] (_setjmp): Define macro to do __sigsetjmp (ENV, 0).
|
||||
[__USE_BSD] (_setjmp): Define macro to do __sigsetjmp (ENV, 0).
|
||||
[__FAVOR_BSD]: Remove all these defns.
|
||||
[__USE_POSIX] (sigjmp_buf): Define as another name for `jmp_buf'.
|
||||
[__USE_POSIX] (sigsetjmp): Define to call __sigsetjmp.
|
||||
@@ -652,7 +652,7 @@ Wed Oct 19 02:40:02 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
|
||||
|
||||
* assert/assert-perror.c (__assert_perror_fail): New file.
|
||||
* assert/assert.h (assert_perror): New macro.
|
||||
|
||||
|
||||
* Version 1.08.11.
|
||||
|
||||
* hurd/hurdsig.c (abort_rpcs): Actually return a port instead of
|
||||
@@ -760,7 +760,7 @@ Fri Sep 30 16:49:09 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
|
||||
For ctty fds, use the `ctty' cell for the ctty-special port.
|
||||
* hurd/dtable.c (get_dtable_port): Use port, never ctty.
|
||||
(fork_child_dtable): Reset D->ctty instead of D->port.
|
||||
(ctty_new_pgrp): Likewise.
|
||||
(ctty_new_pgrp): Likewise.
|
||||
* sysdeps/mach/hurd/__ioctl.c: Use ctty port for RPC if set and
|
||||
!NOCTTY.
|
||||
* hurd/port2fd.c (_hurd_port2fd): Install normal port in D->port
|
||||
File diff suppressed because it is too large
Load Diff
@@ -997,8 +997,8 @@ Mon Jan 6 03:31:46 1997 Ulrich Drepper <drepper@cygnus.com>
|
||||
* signal/sigfillset.c: Likewise.
|
||||
|
||||
* signal/signal.h: Change back handling of signal. The BSD
|
||||
version is preferred and the new sysv_signal is used when
|
||||
__USE_XOPEN.
|
||||
version is preferred and the new sysv_signal is used when
|
||||
__USE_XOPEN.
|
||||
* sysdeps/posix/sysv_signal.c: Renamed from signal.c. Use SVID
|
||||
semantic.
|
||||
* sysdeps/posix/signal.c: Renamed from bsd_signal.c. Use BSD
|
||||
@@ -1579,8 +1579,8 @@ Thu Dec 19 14:24:50 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.
|
||||
* nis/nss_nis/nis-spwd.c: Likewise.
|
||||
|
||||
* nis/nss_compat/compat-grp.c (getgrent_next_nis,
|
||||
getgrent_next_file): Pass the correct type for the buffer to the
|
||||
parser function.
|
||||
getgrent_next_file): Pass the correct type for the buffer to the
|
||||
parser function.
|
||||
* nis/nss_compat/compat-pwd.c (getpwent_next_netgr,
|
||||
getpwent_next_nis, getpwent_next_file): Likewise.
|
||||
* nis/nss_compat/compat-spwd.c (getspent_next_netgr,
|
||||
@@ -3267,7 +3267,7 @@ Fri Nov 15 12:27:25 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
|
||||
funlockfile, not _IO_funlockfile.
|
||||
|
||||
* sysdeps/posix/readv.c (readv): Change return type to ssize_t.
|
||||
Deansideclized.
|
||||
Deansideclized.
|
||||
* sysdeps/posix/writev.c (writev): Likewise.
|
||||
|
||||
* sysdeps/mach/hurd/lchown.c: Include <fcntl.h> and fix typo.
|
||||
@@ -3331,7 +3331,7 @@ Wed Nov 13 03:09:16 1996 Ulrich Drepper <drepper@cygnus.com>
|
||||
Tue Nov 12 16:58:41 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
|
||||
|
||||
* mach/mach.h (__mach_msg_destroy, mach_msg_destroy, __mach_msg):
|
||||
Provide prototypes.
|
||||
Provide prototypes.
|
||||
|
||||
* mach/msg-destroy.c (mach_msg_destroy_port,
|
||||
mach_msg_destroy_memory): Use prototype syntax.
|
||||
@@ -3344,9 +3344,9 @@ Tue Nov 12 16:58:41 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
|
||||
we pass O_NOLINK on the open.
|
||||
|
||||
* manual/errno.texi (EBADMSG, EIDRM, EMULTIHOP, ENODATA, ENOLINK,
|
||||
ENOMSG, ENOSR, ENOSTR, EOVERFLOW, EPROTO, ETIME): Redesignate as
|
||||
an XOPEN error code, move to before the "Linux only" section, and
|
||||
give it a new number for the Hurd.
|
||||
ENOMSG, ENOSR, ENOSTR, EOVERFLOW, EPROTO, ETIME): Redesignate as
|
||||
an XOPEN error code, move to before the "Linux only" section, and
|
||||
give it a new number for the Hurd.
|
||||
|
||||
Tue Nov 12 03:35:01 1996 Christian von Roques <roques@pond.sub.org>
|
||||
|
||||
@@ -1700,7 +1700,7 @@
|
||||
parameters.
|
||||
* crypt/sysdeps/unix/crypt-private.h: Likewise. Also add const to
|
||||
first parameter of _ufc_mk_keytab_r.
|
||||
* crypt/sysdeps/unix/crypt.c: Update prototypes.
|
||||
* crypt/sysdeps/unix/crypt.c: Update prototypes.
|
||||
* crypt/sysdeps/unix/crypt-entry.c: Likewise.
|
||||
* crypt/sysdeps/unix/crypt_util.c: Likewise.
|
||||
|
||||
@@ -223,7 +223,7 @@ not here.
|
||||
|
||||
2013-01-08 Andreas Jaeger <aj@suse.de>
|
||||
|
||||
[BZ #14985]
|
||||
[BZ# 14985]
|
||||
* sysdeps/unix/sysv/linux/alpha/bits/epoll.h (EPOLL_NONBLOCK): Remove.
|
||||
|
||||
2013-01-02 Joseph Myers <joseph@codesourcery.com>
|
||||
@@ -204,7 +204,7 @@ not here.
|
||||
2013-05-15 Guy Martin <gmsoft@tuxicoman.be>
|
||||
Carlos O'Donell <carlos@redhat.com>
|
||||
|
||||
[BZ #15000]
|
||||
[BZ# 15000]
|
||||
* ports/sysdeps/hppa/fpu/fpu_control.h (_FPU_GETCW): Set cw.
|
||||
(_FPU_SETCW): Pass address to fldd.
|
||||
|
||||
@@ -235,7 +235,7 @@ not here.
|
||||
|
||||
2013-01-08 Andreas Jaeger <aj@suse.de>
|
||||
|
||||
[BZ #14985]
|
||||
[BZ# 14985]
|
||||
* sysdeps/unix/sysv/linux/hppa/sys/epoll.h (EPOLL_NONBLOCK):
|
||||
Remove.
|
||||
|
||||
@@ -722,7 +722,7 @@ not here.
|
||||
|
||||
2013-01-08 Andreas Jaeger <aj@suse.de>
|
||||
|
||||
[BZ #14985]
|
||||
[BZ# 14985]
|
||||
* sysdeps/unix/sysv/linux/mips/bits/epoll.h (EPOLL_NONBLOCK): Remove.
|
||||
|
||||
2013-01-02 Joseph Myers <joseph@codesourcery.com>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -146,12 +146,6 @@ will be used, and CFLAGS sets optimization options for the compiler.
|
||||
of routines called directly from assembler are excluded from this
|
||||
protection.
|
||||
|
||||
'--enable-bind-now'
|
||||
Disable lazy binding for installed shared objects. This provides
|
||||
additional security hardening because it enables full RELRO and a
|
||||
read-only global offset table (GOT), at the cost of slightly
|
||||
increased program load times.
|
||||
|
||||
'--enable-pt_chown'
|
||||
The file 'pt_chown' is a helper binary for 'grantpt' (*note
|
||||
Pseudo-Terminals: Allocation.) that is installed setuid root to fix
|
||||
@@ -177,16 +171,18 @@ will be used, and CFLAGS sets optimization options for the compiler.
|
||||
|
||||
'--enable-tunables'
|
||||
Tunables support allows additional library parameters to be
|
||||
customized at runtime. This feature is enabled by default. This
|
||||
option can take the following values:
|
||||
|
||||
'yes'
|
||||
This is the default if no option is passed to configure. This
|
||||
enables tunables and selects the default frontend (currently
|
||||
'valstring').
|
||||
customized at runtime. This is an experimental feature and affects
|
||||
startup time and is thus disabled by default. This option can take
|
||||
the following values:
|
||||
|
||||
'no'
|
||||
This option disables tunables.
|
||||
This is the default if the option is not passed to configure.
|
||||
This disables tunables.
|
||||
|
||||
'yes'
|
||||
This is the default if the option is passed to configure.
|
||||
This enables tunables and selects the default frontend
|
||||
(currently 'valstring').
|
||||
|
||||
'valstring'
|
||||
This enables tunables and selects the 'valstring' frontend for
|
||||
@@ -194,18 +190,6 @@ will be used, and CFLAGS sets optimization options for the compiler.
|
||||
colon-separated list in a single environment variable
|
||||
'GLIBC_TUNABLES'.
|
||||
|
||||
'--enable-obsolete-nsl'
|
||||
By default, libnsl is only built as shared library for backward
|
||||
compatibility and the NSS modules libnss_compat, libnss_nis and
|
||||
libnss_nisplus are not built at all. Use this option to enable
|
||||
libnsl with all depending NSS modules and header files.
|
||||
|
||||
'--disable-experimental-malloc'
|
||||
By default, a per-thread cache is enabled in 'malloc'. While this
|
||||
cache can be disabled on a per-application basis using tunables
|
||||
(set glibc.malloc.tcache_count to zero), this option can be used to
|
||||
remove it from the build completely.
|
||||
|
||||
'--build=BUILD-SYSTEM'
|
||||
'--host=HOST-SYSTEM'
|
||||
These options are for cross-compiling. If you specify both options
|
||||
@@ -426,19 +410,14 @@ build the GNU C Library:
|
||||
recommend GNU 'make' version 3.79. All earlier versions have
|
||||
severe bugs or lack features.
|
||||
|
||||
* GCC 4.9 or newer
|
||||
* GCC 4.7 or newer
|
||||
|
||||
GCC 4.9 or higher is required. In general it is recommended to use
|
||||
GCC 4.7 or higher is required. In general it is recommended to use
|
||||
the newest version of the compiler that is known to work for
|
||||
building the GNU C Library, as newer compilers usually produce
|
||||
better code. As of release time, GCC 7.1 is the newest compiler
|
||||
better code. As of release time, GCC 6.3 is the newest compiler
|
||||
verified to work to build the GNU C Library.
|
||||
|
||||
For PowerPC 64-bits little-endian (powerpc64le), GCC 6.2 or higher
|
||||
is required. This compiler version is the first to provide the
|
||||
features required for building the GNU C Library with support for
|
||||
'_Float128'.
|
||||
|
||||
For multi-arch support it is recommended to use a GCC which has
|
||||
been built with support for GNU indirect functions. This ensures
|
||||
that correct debugging information is generated for functions
|
||||
@@ -454,11 +433,11 @@ build the GNU C Library:
|
||||
Check the FAQ for any special compiler issues on particular
|
||||
platforms.
|
||||
|
||||
* GNU 'binutils' 2.25 or later
|
||||
* GNU 'binutils' 2.22 or later
|
||||
|
||||
You must use GNU 'binutils' (as and ld) to build the GNU C Library.
|
||||
No other assembler or linker has the necessary functionality at the
|
||||
moment. As of release time, GNU 'binutils' 2.27 is the newest
|
||||
moment. As of release time, GNU 'binutils' 2.25 is the newest
|
||||
verified to work to build the GNU C Library.
|
||||
|
||||
* GNU 'texinfo' 4.7 or later
|
||||
@@ -510,15 +489,13 @@ Specific advice for GNU/Linux systems
|
||||
|
||||
If you are installing the GNU C Library on GNU/Linux systems, you need
|
||||
to have the header files from a 3.2 or newer kernel around for
|
||||
reference. (For the ia64 architecture, you need version 3.2.18 or newer
|
||||
because this is the first version with support for the 'accept4' system
|
||||
call.) These headers must be installed using 'make headers_install';
|
||||
the headers present in the kernel source directory are not suitable for
|
||||
direct use by the GNU C Library. You do not need to use that kernel,
|
||||
just have its headers installed where the GNU C Library can access them,
|
||||
referred to here as INSTALL-DIRECTORY. The easiest way to do this is to
|
||||
unpack it in a directory such as '/usr/src/linux-VERSION'. In that
|
||||
directory, run 'make headers_install
|
||||
reference. These headers must be installed using 'make
|
||||
headers_install'; the headers present in the kernel source directory are
|
||||
not suitable for direct use by the GNU C Library. You do not need to
|
||||
use that kernel, just have its headers installed where the GNU C Library
|
||||
can access them, referred to here as INSTALL-DIRECTORY. The easiest way
|
||||
to do this is to unpack it in a directory such as
|
||||
'/usr/src/linux-VERSION'. In that directory, run 'make headers_install
|
||||
INSTALL_HDR_PATH=INSTALL-DIRECTORY'. Finally, configure the GNU C
|
||||
Library with the option '--with-headers=INSTALL-DIRECTORY/include'. Use
|
||||
the most recent kernel you can get your hands on. (If you are
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
See https://sourceware.org/glibc/wiki/MAINTAINERS
|
||||
+9
-22
@@ -386,13 +386,6 @@ LDFLAGS.so += $(hashstyle-LDFLAGS)
|
||||
LDFLAGS-rtld += $(hashstyle-LDFLAGS)
|
||||
endif
|
||||
|
||||
# If lazy relocations are disabled, add the -z now flag. Use
|
||||
# LDFLAGS-lib.so instead of LDFLAGS.so, to avoid adding the flag to
|
||||
# test modules.
|
||||
ifeq ($(bind-now),yes)
|
||||
LDFLAGS-lib.so += -Wl,-z,now
|
||||
endif
|
||||
|
||||
# Command to run after every final link (executable or shared object).
|
||||
# This is invoked with $(call after-link,...), so it should operate on
|
||||
# the file $1. This can be set to do some sort of post-processing on
|
||||
@@ -409,7 +402,7 @@ ifndef +link-pie
|
||||
+link-pie-before-libc = $(CC) -pie -Wl,-O1 -nostdlib -nostartfiles -o $@ \
|
||||
$(sysdep-LDFLAGS) $(LDFLAGS) $(LDFLAGS-$(@F)) \
|
||||
$(combreloc-LDFLAGS) $(relro-LDFLAGS) $(hashstyle-LDFLAGS) \
|
||||
$(firstword $(CRT-$(@F)) $(csu-objpfx)S$(start-installed-name)) \
|
||||
$(addprefix $(csu-objpfx),S$(start-installed-name)) \
|
||||
$(+preinit) $(+prectorS) \
|
||||
$(filter-out $(addprefix $(csu-objpfx),start.o \
|
||||
S$(start-installed-name))\
|
||||
@@ -465,7 +458,7 @@ else # not build-pie-default
|
||||
+link-before-libc = $(CC) -nostdlib -nostartfiles -o $@ \
|
||||
$(sysdep-LDFLAGS) $(LDFLAGS) $(LDFLAGS-$(@F)) \
|
||||
$(combreloc-LDFLAGS) $(relro-LDFLAGS) $(hashstyle-LDFLAGS) \
|
||||
$(firstword $(CRT-$(@F)) $(csu-objpfx)$(start-installed-name)) \
|
||||
$(addprefix $(csu-objpfx),$(start-installed-name)) \
|
||||
$(+preinit) $(+prector) \
|
||||
$(filter-out $(addprefix $(csu-objpfx),start.o \
|
||||
$(start-installed-name))\
|
||||
@@ -908,8 +901,7 @@ libio-include = -I$(..)libio
|
||||
# List of non-library modules that we build.
|
||||
built-modules = iconvprogs iconvdata ldconfig lddlibc4 libmemusage \
|
||||
libSegFault libpcprofile librpcsvc locale-programs \
|
||||
memusagestat nonlib nscd extramodules libnldbl libsupport \
|
||||
testsuite
|
||||
memusagestat nonlib nscd extramodules libnldbl libsupport
|
||||
|
||||
in-module = $(subst -,_,$(firstword $(libof-$(basename $(@F))) \
|
||||
$(libof-$(<F)) \
|
||||
@@ -1107,7 +1099,6 @@ postclean-generated += soversions.mk soversions.i \
|
||||
shlib-versions.v shlib-versions.v.i
|
||||
|
||||
before-compile += $(common-objpfx)libc-modules.h
|
||||
common-generated += libc-modules.h libc-modules.stmp
|
||||
ifeq ($(soversions.mk-done),t)
|
||||
# Generate a header with macro definitions for use with the IS_IN macro.
|
||||
# These are the possible values for the MODULE_NAME macro defined when building
|
||||
@@ -1126,19 +1117,15 @@ endif
|
||||
# glibc.
|
||||
ifneq (no,$(have-tunables))
|
||||
before-compile += $(common-objpfx)dl-tunable-list.h
|
||||
common-generated += dl-tunable-list.h dl-tunable-list.stmp
|
||||
|
||||
$(common-objpfx)dl-tunable-list.h: $(common-objpfx)dl-tunable-list.stmp; @:
|
||||
$(common-objpfx)dl-tunable-list.stmp: \
|
||||
$(..)scripts/gen-tunables.awk \
|
||||
$(..)elf/dl-tunables.list \
|
||||
$(wildcard $(subdirs:%=$(..)%/dl-tunables.list)) \
|
||||
$(wildcard $(sysdirs:%=%/dl-tunables.list))
|
||||
$(AWK) -f $^ > ${@:stmp=T}
|
||||
$(move-if-change) ${@:stmp=T} ${@:stmp=h}
|
||||
touch $@
|
||||
$(common-objpfx)dl-tunable-list.h: $(..)scripts/gen-tunables.awk \
|
||||
$(..)elf/dl-tunables.list
|
||||
$(AWK) -f $^ > $@.tmp
|
||||
mv $@.tmp $@
|
||||
endif
|
||||
|
||||
common-generated += libc-modules.h libc-modules.stmp
|
||||
|
||||
# The name under which the run-time dynamic linker is installed.
|
||||
# We are currently going for the convention that `/lib/ld.so.1'
|
||||
# names the SVR4/ELF ABI-compliant dynamic linker.
|
||||
|
||||
@@ -267,10 +267,61 @@ $(objpfx)check-local-headers.out: scripts/check-local-headers.sh
|
||||
"$(includedir)" "$(objpfx)" < /dev/null > $@; \
|
||||
$(evaluate-test)
|
||||
|
||||
ifneq ($(PERL),no)
|
||||
installed-headers = argp/argp.h assert/assert.h catgets/nl_types.h \
|
||||
crypt/crypt.h ctype/ctype.h debug/execinfo.h \
|
||||
dirent/dirent.h dlfcn/dlfcn.h elf/elf.h elf/link.h \
|
||||
gmon/sys/gmon.h gmon/sys/gmon_out.h gmon/sys/profil.h \
|
||||
grp/grp.h gshadow/gshadow.h iconv/iconv.h iconv/gconv.h \
|
||||
$(wildcard inet/netinet/*.h) \
|
||||
$(wildcard inet/arpa/*.h inet/protocols/*.h) \
|
||||
inet/aliases.h inet/ifaddrs.h inet/netinet/ip6.h \
|
||||
inet/netinet/icmp6.h intl/libintl.h io/sys/stat.h \
|
||||
io/sys/statfs.h io/sys/vfs.h io/sys/statvfs.h \
|
||||
io/fcntl.h io/sys/fcntl.h io/poll.h io/sys/poll.h \
|
||||
io/utime.h io/ftw.h io/fts.h io/sys/sendfile.h \
|
||||
libio/stdio.h libio/libio.h locale/locale.h \
|
||||
locale/langinfo.h locale/xlocale.h login/utmp.h \
|
||||
login/lastlog.h login/pty.h malloc/malloc.h \
|
||||
malloc/obstack.h malloc/mcheck.h math/math.h \
|
||||
math/complex.h math/fenv.h math/tgmath.h misc/sys/uio.h \
|
||||
$(wildcard nis/rpcsvc/*.h) nptl_db/thread_db.h \
|
||||
sysdeps/nptl/pthread.h sysdeps/pthread/semaphore.h \
|
||||
nss/nss.h posix/sys/utsname.h posix/sys/times.h \
|
||||
posix/sys/wait.h posix/sys/types.h posix/unistd.h \
|
||||
posix/glob.h posix/regex.h posix/wordexp.h posix/fnmatch.h\
|
||||
posix/getopt.h posix/tar.h posix/sys/unistd.h \
|
||||
posix/sched.h posix/re_comp.h posix/wait.h \
|
||||
posix/cpio.h posix/spawn.h pwd/pwd.h resolv/resolv.h \
|
||||
resolv/netdb.h $(wildcard resolv/arpa/*.h) \
|
||||
resource/sys/resource.h resource/sys/vlimit.h \
|
||||
resource/sys/vtimes.h resource/ulimit.h rt/aio.h \
|
||||
rt/mqueue.h setjmp/setjmp.h shadow/shadow.h \
|
||||
signal/signal.h signal/sys/signal.h socket/sys/socket.h \
|
||||
socket/sys/un.h stdio-common/printf.h \
|
||||
stdio-common/stdio_ext.h stdlib/stdlib.h stdlib/alloca.h \
|
||||
stdlib/monetary.h stdlib/fmtmsg.h stdlib/ucontext.h \
|
||||
sysdeps/generic/inttypes.h sysdeps/generic/stdint.h \
|
||||
stdlib/errno.h stdlib/sys/errno.h string/string.h \
|
||||
string/strings.h string/memory.h string/endian.h \
|
||||
string/argz.h string/envz.h string/byteswap.h \
|
||||
$(wildcard sunrpc/rpc/*.h sunrpc/rpcsvc/*.h) \
|
||||
sysvipc/sys/ipc.h sysvipc/sys/msg.h sysvipc/sys/sem.h \
|
||||
sysvipc/sys/shm.h termios/termios.h \
|
||||
termios/sys/termios.h termios/sys/ttychars.h time/time.h \
|
||||
time/sys/time.h time/sys/timeb.h wcsmbs/wchar.h \
|
||||
wctype/wctype.h
|
||||
|
||||
tests-special += $(objpfx)begin-end-check.out
|
||||
$(objpfx)begin-end-check.out: scripts/begin-end-check.pl
|
||||
$(PERL) scripts/begin-end-check.pl $(installed-headers) > $@; \
|
||||
$(evaluate-test)
|
||||
endif
|
||||
|
||||
ifneq "$(headers)" ""
|
||||
# Special test of all the installed headers in this directory.
|
||||
tests-special += $(objpfx)check-installed-headers-c.out
|
||||
libof-check-installed-headers-c := testsuite
|
||||
libof-check-installed-headers-c := nonlib
|
||||
$(objpfx)check-installed-headers-c.out: \
|
||||
scripts/check-installed-headers.sh $(headers)
|
||||
$(SHELL) $(..)scripts/check-installed-headers.sh c \
|
||||
@@ -280,7 +331,7 @@ $(objpfx)check-installed-headers-c.out: \
|
||||
|
||||
ifneq "$(CXX)" ""
|
||||
tests-special += $(objpfx)check-installed-headers-cxx.out
|
||||
libof-check-installed-headers-cxx := testsuite
|
||||
libof-check-installed-headers-cxx := nonlib
|
||||
$(objpfx)check-installed-headers-cxx.out: \
|
||||
scripts/check-installed-headers.sh $(headers)
|
||||
$(SHELL) $(..)scripts/check-installed-headers.sh c++ \
|
||||
|
||||
@@ -105,13 +105,6 @@ $(common-objpfx)%.latest: $(common-objpfx)abi-versions.h
|
||||
sed -n '/ VERSION_$*_/{s/^.*_\([A-Z0-9_]*\).*$$/\1/;h;};$${g;p;}' \
|
||||
$(common-objpfx)abi-versions.h > $@T
|
||||
mv -f $@T $@
|
||||
|
||||
# first-versions.h and ldbl-compat-choose.h provide macros used in
|
||||
# various symbol versioning macro calls.
|
||||
before-compile := $(common-objpfx)first-versions.h \
|
||||
$(common-objpfx)ldbl-compat-choose.h $(before-compile)
|
||||
$(common-objpfx)first-versions.h: $(common-objpfx)versions.stmp
|
||||
$(common-objpfx)ldbl-compat-choose.h: $(common-objpfx)versions.stmp
|
||||
endif # avoid-generated
|
||||
endif # $(build-shared) = yes
|
||||
|
||||
@@ -134,14 +127,6 @@ $(common-objpfx)cstdlib: $(c++-cstdlib-header)
|
||||
$(common-objpfx)cmath: $(c++-cmath-header)
|
||||
$(INSTALL_DATA) $< $@T
|
||||
$(move-if-change) $@T $@
|
||||
ifneq (,$(c++-bits-std_abs-h))
|
||||
# Also make a copy of <bits/std_abs.h> from GCC 7 to prevent it from
|
||||
# including /usr/include/stdlib.h.
|
||||
before-compile := $(common-objpfx)bits/std_abs.h $(before-compile)
|
||||
$(common-objpfx)bits/std_abs.h: $(c++-bits-std_abs-h)
|
||||
$(INSTALL_DATA) $< $@T
|
||||
$(move-if-change) $@T $@
|
||||
endif
|
||||
endif
|
||||
|
||||
before-compile := $(common-objpfx)libc-abis.h $(before-compile)
|
||||
@@ -292,7 +277,7 @@ $(common-objpfx)%.h $(common-objpfx)%.h.d: $(..)scripts/gen-as-const.awk \
|
||||
vpath %.sym $(sysdirs)
|
||||
before-compile += $(gen-as-const-headers:%.sym=$(common-objpfx)%.h)
|
||||
|
||||
tests-internal += $(gen-as-const-headers:%.sym=test-as-const-%)
|
||||
tests += $(gen-as-const-headers:%.sym=test-as-const-%)
|
||||
generated += $(gen-as-const-headers:%.sym=test-as-const-%.c)
|
||||
$(objpfx)test-as-const-%.c: $(..)scripts/gen-as-const.awk $(..)Makerules \
|
||||
%.sym $(common-objpfx)%.h
|
||||
@@ -473,8 +458,7 @@ $(common-objpfx)Versions.all: $(..)scripts/firstversions.awk \
|
||||
$(common-objpfx)Versions.v.i: $(wildcard $(subdirs:%=$(..)%/Versions)) \
|
||||
$(wildcard $(sysdirs:%=%/Versions)) \
|
||||
$(sysd-versions-force)
|
||||
$(common-objpfx)sysd-versions: $(common-objpfx)versions.stmp
|
||||
$(common-objpfx)versions.stmp: $(common-objpfx)Versions.all \
|
||||
$(common-objpfx)sysd-versions: $(common-objpfx)Versions.all \
|
||||
$(common-objpfx)Versions.v \
|
||||
$(..)scripts/versions.awk
|
||||
( echo 'sysd-versions-subdirs = $(subdirs) $(config-sysdirs)' ; \
|
||||
@@ -482,9 +466,8 @@ $(common-objpfx)versions.stmp: $(common-objpfx)Versions.all \
|
||||
| LC_ALL=C $(AWK) -v buildroot=$(common-objpfx) -v defsfile=$< \
|
||||
-v move_if_change='$(move-if-change)' \
|
||||
-f $(word 3,$^); \
|
||||
) > $(common-objpfx)sysd-versionsT
|
||||
mv -f $(common-objpfx)sysd-versionsT $(common-objpfx)sysd-versions
|
||||
touch $@
|
||||
) > $@T
|
||||
mv -f $@T $@
|
||||
endif # avoid-generated
|
||||
endif # $(build-shared) = yes
|
||||
endif # sysd-sorted-done
|
||||
@@ -605,7 +588,7 @@ $(LINK.o) -shared -static-libgcc -Wl,-O1 $(sysdep-LDFLAGS) \
|
||||
$(extra-B-$(@F:lib%.so=%).so) -B$(csu-objpfx) \
|
||||
$(extra-B-$(@F:lib%.so=%).so) $(load-map-file) \
|
||||
-Wl,-soname=lib$(libprefix)$(@F:lib%.so=%).so$($(@F)-version) \
|
||||
$(LDFLAGS.so) $(LDFLAGS-lib.so) $(LDFLAGS-$(@F:lib%.so=%).so) \
|
||||
$(LDFLAGS.so) $(LDFLAGS-$(@F:lib%.so=%).so) \
|
||||
-L$(subst :, -L,$(rpath-link)) -Wl,-rpath-link=$(rpath-link)
|
||||
endef
|
||||
|
||||
@@ -686,17 +669,14 @@ $(build-module-helper) -o $@ $(shlib-lds-flags) \
|
||||
$(call after-link,$@)
|
||||
endef
|
||||
|
||||
# sofini.os must be placed last since it terminates .eh_frame section.
|
||||
build-module-helper-objlist = \
|
||||
$(patsubst %_pic.a,$(whole-archive) %_pic.a $(no-whole-archive),\
|
||||
$(filter-out %.lds $(map-file) $(+preinit) $(+postinit) \
|
||||
$(elf-objpfx)sofini.os \
|
||||
$(link-libc-deps),$^))
|
||||
|
||||
build-module-objlist = $(build-module-helper-objlist) $(LDLIBS-$(@F:%.so=%).so)
|
||||
build-shlib-objlist = $(build-module-helper-objlist) \
|
||||
$(LDLIBS-$(@F:lib%.so=%).so) \
|
||||
$(filter $(elf-objpfx)sofini.os,$^)
|
||||
$(LDLIBS-$(@F:lib%.so=%).so)
|
||||
|
||||
# Don't try to use -lc when making libc.so itself.
|
||||
# Also omits crti.o and crtn.o, which we do not want
|
||||
@@ -706,6 +686,10 @@ LDFLAGS-c.so = -nostdlib -nostartfiles
|
||||
LDLIBS-c.so += $(libc.so-gnulib)
|
||||
# Give libc.so an entry point and make it directly runnable itself.
|
||||
LDFLAGS-c.so += -e __libc_main
|
||||
# If lazy relocation is disabled add the -z now flag.
|
||||
ifeq ($(bind-now),yes)
|
||||
LDFLAGS-c.so += -Wl,-z,now
|
||||
endif
|
||||
# Pre-link the objects of libc_pic.a so that we can locally resolve
|
||||
# COMMON symbols before we link against ld.so. This is because ld.so
|
||||
# contains some of libc_pic.a already, which will prevent the COMMONs
|
||||
@@ -813,21 +797,12 @@ endif
|
||||
|
||||
# The makefile may define $(modules-names) to build additional modules.
|
||||
# These are built with $(build-module), except any in $(modules-names-nobuild).
|
||||
# MODULE_NAME=extramodules, except any in $(modules-names-tests).
|
||||
ifdef modules-names
|
||||
cpp-srcs-left := $(filter-out $(modules-names-tests),$(modules-names))
|
||||
ifneq (,$(cpp-srcs-left))
|
||||
lib := extramodules
|
||||
include $(patsubst %,$(..)libof-iterator.mk,$(cpp-srcs-left))
|
||||
endif
|
||||
|
||||
ifdef modules-names-tests
|
||||
cpp-srcs-left := $(filter $(modules-names-tests),$(modules-names))
|
||||
ifneq (,$(cpp-srcs-left))
|
||||
lib := testsuite
|
||||
include $(patsubst %,$(..)libof-iterator.mk,$(cpp-srcs-left))
|
||||
endif
|
||||
endif
|
||||
# extra-lib.mk is included once for each extra lib to define rules
|
||||
# to build it, and to add its objects to the various variables.
|
||||
# During its evaluation, $(lib) is set to the name of the library.
|
||||
extra-modules-left := $(modules-names)
|
||||
include $(patsubst %,$(..)extra-modules.mk,$(modules-names))
|
||||
|
||||
extra-modules-build := $(filter-out $(modules-names-nobuild),$(modules-names))
|
||||
$(extra-modules-build:%=$(objpfx)%.so): $(objpfx)%.so: \
|
||||
@@ -839,7 +814,7 @@ endif
|
||||
$(patsubst %.o,%.d,$(filter %.o,$(extra-objs:.os=.o))) \
|
||||
$(patsubst %.oS,%.d,$(filter %.oS,$(extra-objs))) \
|
||||
$(patsubst %.o,%.d,$(filter %.o,$(extra-test-objs:.os=.o))) \
|
||||
$(addsuffix .d,$(tests) $(tests-internal) $(xtests) $(test-srcs))
|
||||
$(addsuffix .d,$(tests) $(xtests) $(test-srcs))
|
||||
ifeq ($(build-programs),yes)
|
||||
+depfiles += $(addsuffix .d,$(others) $(sysdep-others))
|
||||
endif
|
||||
@@ -1129,8 +1104,7 @@ $(common-objpfx)format.lds: $(..)scripts/output-format.sed \
|
||||
ifneq (unknown,$(output-format))
|
||||
echo > $@.new 'OUTPUT_FORMAT($(output-format))'
|
||||
else
|
||||
$(LINK.o) -shared $(sysdep-LDFLAGS) $(rtld-LDFLAGS) \
|
||||
$(LDFLAGS.so) $(LDFLAGS-lib.so) \
|
||||
$(LINK.o) -shared $(sysdep-LDFLAGS) $(rtld-LDFLAGS) $(LDFLAGS.so) \
|
||||
-x c /dev/null -o $@.so -Wl,--verbose -v 2>&1 \
|
||||
| sed -n -f $< > $@.new
|
||||
test -s $@.new
|
||||
@@ -1352,22 +1326,11 @@ check: tests
|
||||
.PHONY: xcheck
|
||||
xcheck: xtests
|
||||
|
||||
# The only difference between MODULE_NAME=testsuite and MODULE_NAME=nonlib is
|
||||
# that almost all internal declarations from config.h, libc-symbols.h, and
|
||||
# include/*.h are not available to 'testsuite' code, but are to 'nonlib' code.
|
||||
all-testsuite := $(strip $(tests) $(xtests) $(test-srcs) $(test-extras))
|
||||
ifneq (,$(all-testsuite))
|
||||
cpp-srcs-left = $(all-testsuite)
|
||||
lib := testsuite
|
||||
include $(patsubst %,$(..)libof-iterator.mk,$(cpp-srcs-left))
|
||||
endif
|
||||
|
||||
all-nonlib := $(strip $(tests-internal) $(test-internal-extras) \
|
||||
$(others) $(others-extras))
|
||||
all-nonlib = $(strip $(tests) $(xtests) $(test-srcs) $(test-extras) $(others))
|
||||
ifneq (,$(all-nonlib))
|
||||
cpp-srcs-left = $(all-nonlib)
|
||||
lib := nonlib
|
||||
include $(patsubst %,$(..)libof-iterator.mk,$(cpp-srcs-left))
|
||||
include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
|
||||
endif
|
||||
|
||||
|
||||
@@ -1525,7 +1488,8 @@ $(stdio_lim:h=st): $(..)stdio-common/stdio_lim.h.in $(..)Rules \
|
||||
$(common-objpfx)config.make
|
||||
$(make-target-directory)
|
||||
{ echo '#include "$(..)posix/bits/posix1_lim.h"'; \
|
||||
} | \
|
||||
echo '#define _LIBC 1'; \
|
||||
echo '#include "$(..)misc/sys/uio.h"'; } | \
|
||||
$(CC) -E -dM -MD -MP -MF $(@:st=dT) -MT '$(@:st=h) $(@:st=d)' \
|
||||
$(CPPUNDEFS) $(+includes) -xc - -o $(@:st=hT)
|
||||
sed $(sed-remove-objpfx) $(sed-remove-dotdot) \
|
||||
@@ -1533,14 +1497,21 @@ $(stdio_lim:h=st): $(..)stdio-common/stdio_lim.h.in $(..)Rules \
|
||||
mv -f $(@:st=dt) $(@:st=d)
|
||||
fopen_max=`sed -n 's/^#define OPEN_MAX //1p' $(@:st=hT)`; \
|
||||
filename_max=`sed -n 's/^#define PATH_MAX //1p' $(@:st=hT)`; \
|
||||
iov_max=`sed -n 's/^#define UIO_MAXIOV //p' $(@:st=hT)`; \
|
||||
fopen_max=$${fopen_max:-16}; \
|
||||
filename_max=$${filename_max:-1024}; \
|
||||
if [ -z "$$iov_max" ]; then \
|
||||
define_iov_max="# undef IOV_MAX"; \
|
||||
else \
|
||||
define_iov_max="# define IOV_MAX $$iov_max"; \
|
||||
fi; \
|
||||
sed -e "s/@FOPEN_MAX@/$$fopen_max/" \
|
||||
-e "s/@FILENAME_MAX@/$$filename_max/" \
|
||||
-e "s/@L_tmpnam@/$(L_tmpnam)/" \
|
||||
-e "s/@TMP_MAX@/$(TMP_MAX)/" \
|
||||
-e "s/@L_ctermid@/$(L_ctermid)/" \
|
||||
-e "s/@L_cuserid@/$(L_cuserid)/" \
|
||||
-e "s/@define_IOV_MAX@/$$define_iov_max/" \
|
||||
$< > $(@:st=h.new)
|
||||
$(move-if-change) $(@:st=h.new) $(@:st=h)
|
||||
# Remove these last so that they can be examined if something went wrong.
|
||||
@@ -1569,32 +1540,22 @@ clean: common-clean
|
||||
mostlyclean: common-mostlyclean
|
||||
|
||||
do-tests-clean:
|
||||
-rm -f $(addprefix $(objpfx),$(addsuffix .out,$(tests) \
|
||||
$(tests-internal) \
|
||||
$(xtests) \
|
||||
-rm -f $(addprefix $(objpfx),$(addsuffix .out,$(tests) $(xtests) \
|
||||
$(test-srcs)) \
|
||||
$(addsuffix .test-result,$(tests) \
|
||||
$(tests-internal) \
|
||||
$(xtests) \
|
||||
$(test-srcs)))
|
||||
|
||||
# Remove the object files.
|
||||
common-mostlyclean:
|
||||
-rm -f $(addprefix $(objpfx),$(tests) $(tests-internal) $(xtests) \
|
||||
$(test-srcs) \
|
||||
-rm -f $(addprefix $(objpfx),$(tests) $(xtests) $(test-srcs) \
|
||||
$(others) $(sysdep-others) stubs \
|
||||
$(addsuffix .o,$(tests) \
|
||||
$(tests-internal) \
|
||||
$(xtests) \
|
||||
$(test-srcs) \
|
||||
$(others) \
|
||||
$(addsuffix .o,$(tests) $(xtests) \
|
||||
$(test-srcs) $(others) \
|
||||
$(sysdep-others)) \
|
||||
$(addsuffix .out,$(tests) \
|
||||
$(tests-internal) \
|
||||
$(xtests) \
|
||||
$(addsuffix .out,$(tests) $(xtests) \
|
||||
$(test-srcs)) \
|
||||
$(addsuffix .test-result,$(tests) \
|
||||
$(tests-internal) \
|
||||
$(xtests) \
|
||||
$(test-srcs)))
|
||||
-rm -f $(addprefix $(objpfx),$(extra-objs) $(extra-test-objs) \
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
Header Prefix Suffix
|
||||
|
||||
aio.h aio_, lio_, AIO_, LIO_
|
||||
complex.h cerf{,f,l}, cerfc{,f,l}, cexp2{,f,l},
|
||||
cexpm1{,f,l}, clog10{,f,l}, clog1p{,f,l},
|
||||
clog2{,f,l}, clgamma{,f,l}, ctgamma{,f,l}
|
||||
ctype.h is[a-z], to[a-z]
|
||||
dirent.h d_
|
||||
dlfcn.h RTLD_
|
||||
errno.h E
|
||||
fcntl.h l_, F_, O_, S_
|
||||
fmtmsg.h MM_
|
||||
fnmatch.h FNM_
|
||||
ftw.h FTW
|
||||
glob.h gl_, GLOB_
|
||||
grp.h gr_
|
||||
inttypes.h PRI[a-zX], SCN[a-zX]
|
||||
limits.h _MAX
|
||||
locale.h LC_[A-Z]
|
||||
mqueue.h mq_, MQ_
|
||||
ndbm.h dbm_, DBM_
|
||||
nl_types.h NL_
|
||||
poll.h pd_, ph_, ps_, POLL
|
||||
pthread.h pthread_, PTHREAD_
|
||||
pwd.h pw_
|
||||
regex.h re_, rm_, REG_
|
||||
sched.h sched_, SCHED_
|
||||
semaphore.h sem_, SEM_
|
||||
signal.h sa_, uc_, SIG[A-Z], SIG_[A-Z], SIG_[0-9a-z_]
|
||||
ss_, sv_
|
||||
si_, SI_, sigev_, SIGEV_, sival_, SA_,
|
||||
BUS_, CLD_, FPE_, ILL_, POLL_, SEGV_, SS_, SV_, TRAP_
|
||||
stdint.h int*_t, uint*_t, INT*_MAX, INT*_MIN,
|
||||
INT*_C, UINT*_MAX, UINT*_MIN, UINT*_C
|
||||
stdlib.h str[a-z]
|
||||
string.h str[a-z], wcs[a-z]
|
||||
stropts.h bi_, ic_, l_, sl_, str_,
|
||||
FLUSH[A-Z], I_, M_, MUXID_R[A-Z], S_, SND[A-Z], STR
|
||||
syslog.h LOG_
|
||||
sys/ipc.h ipc_, IPC_
|
||||
sys/mman.h shm_, MAP_, MCL_, MS_, PROT_
|
||||
sys/msg.h msg, MSG[A-Z], MSG_[A-Z]
|
||||
sys/resource.h rlim_, ru_, PRIO_, RLIM_, RLIMIT_, RUSAGE_
|
||||
sys/sem.h sem, SEM_
|
||||
sys/shm.h shm, SHM[A-Z], SHM_[A-Z]
|
||||
sys/socket.h AF_, MSG_, PF_, SO
|
||||
sys/stat.h st_, S_
|
||||
sys/statvfs.h f_, ST_
|
||||
sys/time.h fds_, it_, tv_, FD_, ITIMER_
|
||||
sys/times.h tms_
|
||||
sys/uio.h iov_, IOV_
|
||||
sys/utsname.h uts_
|
||||
sys/wait.h si_, W[A-Z], P_,
|
||||
BUS_, CLD_, FPE_, ILL_, POLL_, SEGV_, SI_, TRAP_
|
||||
termios.h c_, V, I, O, TC, B[0-9]
|
||||
time.h tm_
|
||||
clock_, timer_, it_, tv_,
|
||||
CLOCK_, TIMER_
|
||||
ucontext.h uc_, SS_
|
||||
ulimit.h UL_
|
||||
utime.h utim_
|
||||
utmpx.h ut_ _LVL, _TIME, _PROCESS
|
||||
wchar.h wcs[a-z]
|
||||
wctype.h is[a-z], to[a-z]
|
||||
wordexp.h we_, WRDE_
|
||||
ANY header _t
|
||||
@@ -5,493 +5,19 @@ See the end for copying conditions.
|
||||
Please send GNU C library bug reports via <http://sourceware.org/bugzilla/>
|
||||
using `glibc' in the "product" field.
|
||||
|
||||
Version 2.27
|
||||
Version 2.26
|
||||
|
||||
Major new features:
|
||||
|
||||
* Optimized x86-64 asin, atan2, exp, expf, log, pow, atan, sin and tan
|
||||
with FMA, contributed by Arjan van de Ven and H.J. Lu from Intel.
|
||||
|
||||
* Optimized x86-64 trunc and truncf for processors with SSE4.1.
|
||||
|
||||
* Optimized generic expf, exp2f, logf, log2f and powf.
|
||||
|
||||
* In order to support faster and safer process termination the malloc API
|
||||
family of functions will no longer print a failure address and stack
|
||||
backtrace after detecting heap corruption. The goal is to minimize the
|
||||
amount of work done after corruption is detected and to avoid potential
|
||||
security issues in continued process execution. Reducing shutdown time
|
||||
leads to lower overall process restart latency, so there is benefit both
|
||||
from a security and performance perspective.
|
||||
|
||||
Deprecated and removed features, and other changes affecting compatibility:
|
||||
|
||||
* On GNU/Linux, the obsolete Linux constant PTRACE_SEIZE_DEVEL is no longer
|
||||
defined by <sys/ptrace.h>.
|
||||
|
||||
* libm no longer supports SVID error handling (calling a user-provided
|
||||
matherr function on error) or the _LIB_VERSION variable to control error
|
||||
handling. (SVID error handling and the _LIB_VERSION variable still work
|
||||
for binaries linked against older versions of the GNU C Library.) The
|
||||
libieee.a library is no longer provided. math.h no longer defines struct
|
||||
exception, or the macros X_TLOSS, DOMAIN, SING, OVERFLOW, UNDERFLOW,
|
||||
TLOSS, PLOSS and HUGE.
|
||||
|
||||
* The libm functions pow10, pow10f and pow10l are no longer supported for
|
||||
new programs. Programs should use the standard names exp10, exp10f and
|
||||
exp10l for these functions instead.
|
||||
|
||||
* The mcontext_t type is no longer the same as struct sigcontext. On
|
||||
platforms where it was previously the same, this changes the C++ name
|
||||
mangling for interfaces involving this type.
|
||||
|
||||
Changes to build and runtime requirements:
|
||||
|
||||
[Add changes to build and runtime requirements here]
|
||||
[Add important changes here]
|
||||
|
||||
Security related changes:
|
||||
|
||||
CVE-2009-5064: The ldd script would sometimes run the program under
|
||||
examination directly, without preventing code execution through the
|
||||
dynamic linker. (The glibc project disputes that this is a security
|
||||
vulnerability; only trusted binaries must be examined using the ldd
|
||||
script.)
|
||||
[Add security related changes here]
|
||||
|
||||
The following bugs are resolved with this release:
|
||||
|
||||
[The release manager will add the list generated by
|
||||
scripts/list-fixed-bugs.py just before the release.]
|
||||
|
||||
|
||||
Version 2.26
|
||||
|
||||
Major new features:
|
||||
|
||||
* A per-thread cache has been added to malloc. Access to the cache requires
|
||||
no locks and therefore significantly accelerates the fast path to allocate
|
||||
and free small amounts of memory. Refilling an empty cache requires locking
|
||||
the underlying arena. Performance measurements show significant gains in a
|
||||
wide variety of user workloads. Workloads were captured using a special
|
||||
instrumented malloc and analyzed with a malloc simulator. Contributed by
|
||||
DJ Delorie with the help of Florian Weimer, and Carlos O'Donell.
|
||||
|
||||
* Unicode 10.0.0 Support: Character encoding, character type info, and
|
||||
transliteration tables are all updated to Unicode 10.0.0, using
|
||||
generator scripts contributed by Mike FABIAN (Red Hat).
|
||||
These updates cause user visible changes, especially the changes in
|
||||
wcwidth for many emoji characters cause problems when emoji sequences
|
||||
are rendered with pango, see for example:
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=780669#c5
|
||||
|
||||
* Collation of Hungarian has been overhauled and is now consistent with "The
|
||||
Rules of Hungarian Orthography, 12th edition" (Bug 18934). Contributed by
|
||||
Egmont Koblinger.
|
||||
|
||||
* Improvements to the DNS stub resolver, contributed by Florian Weimer:
|
||||
|
||||
- The GNU C Library will now detect when /etc/resolv.conf has been
|
||||
modified and reload the changed configuration. The new resolver option
|
||||
“no-reload” (RES_NORELOAD) disables this behavior.
|
||||
|
||||
- The GNU C Library now supports an arbitrary number of search domains
|
||||
(configured using the “search” directive in /etc/resolv.conf);
|
||||
previously, there was a hard limit of six domains. For backward
|
||||
compatibility, applications that directly modify the ‘_res’ global
|
||||
object are still limited to six search domains.
|
||||
|
||||
- When the “rotate” (RES_ROTATE) resolver option is active, the GNU C
|
||||
Library will now randomly pick a name server from the configuration as a
|
||||
starting point. (Previously, the second name server was always used.)
|
||||
|
||||
* The tunables feature is now enabled by default. This allows users to tweak
|
||||
behavior of the GNU C Library using the GLIBC_TUNABLES environment variable.
|
||||
|
||||
* New function reallocarray, which resizes an allocated block (like realloc)
|
||||
to the product of two sizes, with a guaranteed clean failure upon integer
|
||||
overflow in the multiplication. Originally from OpenBSD, contributed by
|
||||
Dennis Wölfing and Rüdiger Sonderfeld.
|
||||
|
||||
* New wrappers for the Linux-specific system calls preadv2 and pwritev2.
|
||||
These are extended versions of preadv and pwritev, respectively, taking an
|
||||
additional flags argument. The set of supported flags depends on the
|
||||
running kernel; full support currently requires kernel 4.7 or later.
|
||||
|
||||
* posix_spawnattr_setflags now supports the flag POSIX_SPAWN_SETSID, to
|
||||
create a new session ID for the spawned process. This feature is
|
||||
scheduled to be added to the next major revision of POSIX; for the time
|
||||
being, it is available under _GNU_SOURCE.
|
||||
|
||||
* errno.h is now safe to use from C-preprocessed assembly language on all
|
||||
supported operating systems. In this context, it will only define the
|
||||
Exxxx constants, as preprocessor macros expanding to integer literals.
|
||||
|
||||
* On ia64, powerpc64le, x86-32, and x86-64, the math library now implements
|
||||
128-bit floating point as defined by ISO/IEC/IEEE 60559:2011 (IEEE
|
||||
754-2008) and ISO/IEC TS 18661-3:2015. Contributed by Paul E. Murphy,
|
||||
Gabriel F. T. Gomes, Tulio Magno Quites Machado Filho, and Joseph Myers.
|
||||
|
||||
To compile programs that use this feature, the compiler must support
|
||||
128-bit floating point with the type name _Float128 (as defined by TS
|
||||
18661-3) or __float128 (the nonstandard name used by GCC for C++, and for
|
||||
C prior to version 7). _GNU_SOURCE or __STDC_WANT_IEC_60559_TYPES_EXT__
|
||||
must be defined to make the new interfaces visible.
|
||||
|
||||
The new functions and macros correspond to those present for other
|
||||
floating-point types (except for a few obsolescent interfaces not
|
||||
supported for the new type), with F128 or f128 suffixes; for example,
|
||||
strtof128, HUGE_VAL_F128 and cosf128. Following TS 18661-3, there are no
|
||||
printf or scanf formats for the new type; the strfromf128 and strtof128
|
||||
interfaces should be used instead.
|
||||
|
||||
Deprecated and removed features, and other changes affecting compatibility:
|
||||
|
||||
* The synchronization that pthread_spin_unlock performs has been changed to
|
||||
now be equivalent to a C11 atomic store with release memory order to the
|
||||
spin lock's memory location. Previously, several (but not all)
|
||||
architectures used stronger synchronization (e.g., containing what is
|
||||
often called a full barrier). This change can improve performance, but
|
||||
may affect odd fringe uses of spin locks that depend on the previous
|
||||
behavior (e.g., using spin locks as atomic variables to try to implement
|
||||
Dekker's mutual exclusion algorithm).
|
||||
|
||||
* The port to Native Client running on ARMv7-A (--host=arm-nacl) has been
|
||||
removed.
|
||||
|
||||
* Sun RPC is deprecated. The rpcgen program, librpcsvc, and Sun RPC headers
|
||||
will only be built and installed when the GNU C Library is configured with
|
||||
--enable-obsolete-rpc. This allows alternative RPC implementations, such
|
||||
as TIRPC or rpcsvc-proto, to be used.
|
||||
|
||||
* The NIS(+) name service modules, libnss_nis, libnss_nisplus, and
|
||||
libnss_compat, are deprecated, and will not be built or installed by
|
||||
default.
|
||||
|
||||
The NIS(+) support library, libnsl, is also deprecated. By default, a
|
||||
compatibility shared library will be built and installed, but not headers
|
||||
or development libraries. Only a few NIS-related programs require this
|
||||
library. (In particular, the GNU C Library has never required programs
|
||||
that use 'gethostbyname' to be linked with libnsl.)
|
||||
|
||||
Replacement implementations based on TIRPC, which additionally support
|
||||
IPv6, are available from <https://github.com/thkukuk/>. The configure
|
||||
option --enable-obsolete-nsl will cause libnsl's headers, and the NIS(+)
|
||||
name service modules, to be built and installed.
|
||||
|
||||
* The DNS stub resolver no longer performs EDNS fallback. If EDNS or DNSSEC
|
||||
support is enabled, the configured recursive resolver must support EDNS.
|
||||
(Responding to EDNS-enabled queries with responses which are not
|
||||
EDNS-enabled is fine, but FORMERR responses are not.)
|
||||
|
||||
* res_mkquery and res_nmkquery no longer support the IQUERY opcode. DNS
|
||||
servers have not supported this opcode for a long time.
|
||||
|
||||
* The _res_opcodes variable has been removed from libresolv. It had been
|
||||
exported by accident.
|
||||
|
||||
* <string.h> no longer includes inline versions of any string functions,
|
||||
as this kind of optimization is better done by the compiler. The macros
|
||||
__USE_STRING_INLINES and __NO_STRING_INLINES no longer have any effect.
|
||||
|
||||
* The nonstandard header <xlocale.h> has been removed. Most programs should
|
||||
use <locale.h> instead. If you have a specific need for the definition of
|
||||
locale_t with no other declarations, please contact
|
||||
libc-alpha@sourceware.org and explain.
|
||||
|
||||
* The obsolete header <sys/ultrasound.h> has been removed.
|
||||
|
||||
* The obsolete signal constant SIGUNUSED is no longer defined by <signal.h>.
|
||||
|
||||
* The obsolete function cfree has been removed. Applications should use
|
||||
free instead.
|
||||
|
||||
* The stack_t type no longer has the name struct sigaltstack. This changes
|
||||
the C++ name mangling for interfaces involving this type.
|
||||
|
||||
* The ucontext_t type no longer has the name struct ucontext. This changes
|
||||
the C++ name mangling for interfaces involving this type.
|
||||
|
||||
* On M68k GNU/Linux and MIPS GNU/Linux, the fpregset_t type no longer has
|
||||
the name struct fpregset. On Nios II GNU/Linux, the mcontext_t type no
|
||||
longer has the name struct mcontext. On SPARC GNU/Linux, the struct
|
||||
mc_fq, struct rwindow, struct fpq and struct fq types are no longer
|
||||
defined in sys/ucontext.h, the mc_fpu_t type no longer has the name struct
|
||||
mc_fpu, the gwindows_t type no longer has the name struct gwindows and the
|
||||
fpregset_t type no longer has the name struct fpu. This changes the C++
|
||||
name mangling for interfaces involving those types.
|
||||
|
||||
* On S/390 GNU/Linux, the constants defined by <sys/ptrace.h> have been
|
||||
synced with the kernel:
|
||||
|
||||
- PTRACE_GETREGS, PTRACE_SETREGS, PTRACE_GETFPREGS and PTRACE_SETFPREGS
|
||||
are not supported on this architecture and have been removed.
|
||||
|
||||
- PTRACE_SINGLEBLOCK, PTRACE_SECCOMP_GET_FILTER, PTRACE_PEEKUSR_AREA,
|
||||
PTRACE_POKEUSR_AREA, PTRACE_GET_LAST_BREAK, PTRACE_ENABLE_TE,
|
||||
PTRACE_DISABLE_TE and PTRACE_TE_ABORT_RAND have been added.
|
||||
|
||||
Programs that assume the GET/SETREGS ptrace requests are universally
|
||||
available will now fail to build, instead of malfunctioning at runtime.
|
||||
|
||||
Changes to build and runtime requirements:
|
||||
|
||||
* Linux kernel 3.2 or later is required at runtime, on all architectures
|
||||
supported by that kernel. (This is a change from version 2.25 only for
|
||||
x86-32 and x86-64.)
|
||||
|
||||
* GNU Binutils 2.25 or later is now required to build the GNU C Library.
|
||||
|
||||
* On most architectures, GCC 4.9 or later is required to build the GNU C
|
||||
Library. On powerpc64le, GCC 6.2 or later is required.
|
||||
|
||||
Older GCC versions and non-GNU compilers are still supported when
|
||||
compiling programs that use the GNU C Library. (We do not know exactly
|
||||
how old, and some GNU extensions to C may be _de facto_ required. If you
|
||||
are interested in helping us make this statement less vague, please
|
||||
contact libc-alpha@sourceware.org.)
|
||||
|
||||
Security related changes:
|
||||
|
||||
* The DNS stub resolver limits the advertised UDP buffer size to 1200 bytes,
|
||||
to avoid fragmentation-based spoofing attacks (CVE-2017-12132).
|
||||
|
||||
* LD_LIBRARY_PATH is now ignored in binaries running in privileged AT_SECURE
|
||||
mode to guard against local privilege escalation attacks (CVE-2017-1000366).
|
||||
|
||||
* Avoid printing a backtrace from the __stack_chk_fail function since it is
|
||||
called on a corrupt stack and a backtrace is unreliable on a corrupt stack
|
||||
(CVE-2010-3192).
|
||||
|
||||
* A use-after-free vulnerability in clntudp_call in the Sun RPC system has been
|
||||
fixed (CVE-2017-12133).
|
||||
|
||||
The following bugs are resolved with this release:
|
||||
|
||||
[984] network: Respond to changed resolv.conf in gethostbyname
|
||||
[5010] network: sunrpc service cleanup causes unwanted port mapper traffic
|
||||
[12068] localedata: sc_IT: misspelled yesexpr/day/abday/mon/abmon/date_fmt
|
||||
fields
|
||||
[12189] libc: __stack_chk_fail should not attempt a backtrace
|
||||
(CVE-2010-3192)
|
||||
[14096] time: Race condition on timezone/tst-timezone.out
|
||||
[14172] localedata: az_IR: new locale
|
||||
[14995] build: glibc fails to build if gold is the default linker, even if
|
||||
ld.bfd is available
|
||||
[15998] build: [powerpc] Set arch_minimum_kernel for powerpc LE
|
||||
[16637] network: inet_pton function is accepting IPv6 with bad format
|
||||
[16640] string: string/strtok.c: undefined behaviour inconsistent between
|
||||
x86 and other generic code
|
||||
[16875] localedata: ko_KR: fix lang_name
|
||||
[17225] localedata: ar_SY: localized month names for May and June are
|
||||
incorrect
|
||||
[17297] localedata: da_DK: wrong date_fmt string
|
||||
[18907] stdio: Incorrect order of __wur __THROW in <printf.h>
|
||||
[18934] localedata: hu_HU: collate: fix multiple bugs and add tests
|
||||
[18988] nptl: pthread wastes memory with mlockall(MCL_FUTURE)
|
||||
[19066] localedata: ar_SA abbreviated day and month names are in English
|
||||
[19569] network: resolv: Support an arbitrary number of search domains
|
||||
[19570] network: Implement random DNS server selection in the stub
|
||||
resolver
|
||||
[19838] locale: localedef fails on PA-RISC
|
||||
[19919] localedata: iso14651_t1_common: Correct the Malayalam sorting
|
||||
order of 0D36 and 0D37
|
||||
[19922] localedata: iso14651_t1_common: Define collation for Malayalam
|
||||
chillu characters
|
||||
[20098] libc: FAIL: debug/backtrace-tst on hppa
|
||||
[20257] network: sunrpc: clntudp_call does not enforce timeout when
|
||||
receiving data
|
||||
[20275] localedata: locale day/abday/mon/abmon should not have trailing
|
||||
whitespace
|
||||
[20313] localedata: Update locale data to Unicode 9.0
|
||||
[20424] manual: Document how to provide a malloc replacement
|
||||
[20496] localedata: agr_PE: new language locale Awajún / Aguaruna (agr)
|
||||
for Peru
|
||||
[20686] locale: Add el_GR@euro to SUPPORTED.
|
||||
[20831] dynamic-link: _dl_map_segments does not test for __mprotect
|
||||
failures consistently
|
||||
[21015] dynamic-link: Document and fix --enable-bind-now
|
||||
[21016] nptl: pthread_cond support is broken on hppa
|
||||
[21029] libc: glibc-2.23 (and later) fails to compile with -fno-omit-
|
||||
frame-pointer on i386
|
||||
[21049] libc: segfault in longjmp_chk() due to clobbered processor
|
||||
register
|
||||
[21075] libc: unused assigment to %g4 in sparc/sparc{64,32}/clone.S
|
||||
[21088] libc: Build fails with --enable-static-nss
|
||||
[21094] math: cosf(1.57079697) has 3 ulp error on targets where the
|
||||
generic c code is used
|
||||
[21109] libc: Tunables broken on big-endian
|
||||
[21112] math: powf has large ulp errors with base close to 1 and exponent
|
||||
around 4000
|
||||
[21115] network: sunrpc: Use-after-free in error path in clntudp_call
|
||||
(CVE-2017-12133)
|
||||
[21120] malloc: glibc malloc is incompatible with GCC 7
|
||||
[21130] math: Incorrect return from y0l (-inf) and y1l (-inf) when linking
|
||||
with -lieee
|
||||
[21134] math: Exception (divide by zero) not set for y0/y1 (0.0) and y0/y1
|
||||
(-0.0) when linking with -lieee
|
||||
[21171] math: log10, log2 and lgamma return incorrect results
|
||||
[21179] libc: handle R_SPARC_DISP64 and R_SPARC_REGISTER relocs
|
||||
[21182] libc: __memchr_sse2: regression in glibc-2.25 on i686
|
||||
[21207] localedata: ce_RU: update weekdays from CLDR
|
||||
[21209] dynamic-link: LD_HWCAP_MASK read in setuid binaries
|
||||
[21217] localedata: Update months from CLDR-31
|
||||
[21232] libc: miss posix_fadvise64 on MIPS64 when static linking
|
||||
[21243] libc: support_delete_temp_file should issue warning for failed
|
||||
remove()
|
||||
[21244] libc: support resolv_test_start() socket fd close should be
|
||||
checked for errors.
|
||||
[21253] libc: localedef randomly segfaults when using -fstack-check due to
|
||||
new posix_spawn implementation
|
||||
[21258] dynamic-link: Branch predication in _dl_runtime_resolve_avx512_opt
|
||||
leads to lower CPU frequency
|
||||
[21259] libc: [alpha] termios.h missing IXANY for POSIX
|
||||
[21261] libc: [sparc64] bits/setjmp.h namespace
|
||||
[21267] network: [mips] bits/socket.h IOC* namespace
|
||||
[21268] libc: [alpha] termios.h NL2, NL3 namespace
|
||||
[21270] libc: mmap64 silently truncates large offset values
|
||||
[21275] libc: posix_spawn always crashes on ia64 now
|
||||
[21277] libc: [alpha] termios.h missing IUCLC for UNIX98 and older
|
||||
[21280] math: [powerpc] logbl for POWER7 return incorrect results
|
||||
[21289] libc: Incorrect declaration for 32-bit platforms with
|
||||
_FILE_OFFSET_BITS=64 causes build error
|
||||
[21295] network: GETAI(AF_UNSPEC) drops IPv6 addresses if nss module does
|
||||
not support gethostbyname4_r
|
||||
[21298] nptl: rwlock can deadlock on frequent reader/writer phase
|
||||
switching
|
||||
[21338] malloc: mallopt M_ARENA_MAX doesn't set the maximum number of
|
||||
arenas
|
||||
[21340] libc: Support POSIX_SPAWN_SETSID
|
||||
[21357] libc: unwind-dw2-fde deadlock when using AddressSanitizer
|
||||
[21359] network: ns_name_pack needs additional byte in destination buffer
|
||||
[21361] network: resolv: Reduce advertised EDNS0 buffer size to guard
|
||||
against fragmentation attacks (CVE-2017-12132)
|
||||
[21369] network: resolv: Remove EDNS fallback
|
||||
[21371] libc: Missing timespec definition when compiled with _XOPEN_SOURCE
|
||||
and _POSIX_C_SOURCE
|
||||
[21386] nptl: Assertion in fork for distinct parent PID is incorrect
|
||||
[21391] dynamic-link: x86: Set dl_platform and dl_hwcap from CPU features
|
||||
[21393] stdio: Missing dup3 error check in freopen, freopen64
|
||||
[21396] libc: Use AVX2 memcpy/memset on Skylake server
|
||||
[21399] localedata: Bad description for U00EC in
|
||||
localedata/charmaps/CP1254
|
||||
[21411] malloc: realloc documentation error
|
||||
[21426] network: sys/socket.h uio.h namespace
|
||||
[21428] libc: [aarch64] tst-backtrace5 testsuite failure
|
||||
[21445] libc: signal.h bsd_signal namespace
|
||||
[21455] network: Network headers stdint.h namespace
|
||||
[21474] network: resolv: res_init does not use RES_DFLRETRY (2) but 4 for
|
||||
retry value
|
||||
[21475] network: resolv: Overlong search path is truncated mid-label
|
||||
[21511] libc: sigstack namespace
|
||||
[21512] libc: clone() ends up calling exit_group() through _exit() wrapper
|
||||
[21514] libc: sysdeps/unix/sysv/linux/sys/syscall.h:31:27: fatal error:
|
||||
bits/syscall.h: No such file or directory
|
||||
[21517] libc: struct sigaltstack namespace
|
||||
[21528] dynamic-link: Duplicated minimal strtoul implementations in ld.so
|
||||
[21533] localedata: Update locale data to Unicode 10.0
|
||||
[21537] libc:
|
||||
../sysdeps/unix/sysv/linux/s390/s390-32/__makecontext_ret.S:44: Error:
|
||||
junk at end of line, first unrecognized character is `@'
|
||||
[21538] libc: SIG_HOLD missing for XPG4
|
||||
[21539] libc: S390: Mismatch between kernel and glibc ptrace.h with
|
||||
request 12: PTRACE_SINGLEBLOCK vs PTRACE_GETREGS.
|
||||
[21542] libc: Use conservative default for sysconf (_SC_NPROCESSORS_ONLN)
|
||||
[21543] libc: sigevent namespace
|
||||
[21548] libc: [mips] get/set/make/swap context for MIPS O32 assume wrong
|
||||
size for general purpose registers in mcontext_t structure
|
||||
[21550] libc: sigwait namespace
|
||||
[21552] libc: XPG4 bsd_signal namespace
|
||||
[21554] libc: sigpause namespace
|
||||
[21560] libc: sys/wait.h signal.h namespace
|
||||
[21561] libc: waitid namespace
|
||||
[21573] nptl: GCC 7: /usr/bin/install: cannot remove
|
||||
'/usr/include/stdlib.h': Permission denied
|
||||
[21575] libc: sys/wait.h missing struct rusage definition
|
||||
[21584] libc: sigaltstack etc namespace
|
||||
[21597] libc: siginterrupt namespace
|
||||
[21607] math: hppa: FAIL: math/test-tgmath
|
||||
[21609] dynamic-link: Incomplete workaround for GCC __tls_get_addr ABI
|
||||
issue on x86-64
|
||||
[21622] libc: [tile] missing SA_* for POSIX.1:2008
|
||||
[21624] dynamic-link: ld.so: Unsafe alloca allows local attackers to alias
|
||||
stack and heap (CVE-2017-1000366)
|
||||
[21625] libc: wait3 namespace
|
||||
[21654] nss: Incorrect pointer alignment in NSS group merge result
|
||||
construction
|
||||
[21657] network: Parse interface zone id for node-local multicast
|
||||
[21662] string: memcmp-avx2-movbe.S lacks saturating subtraction for
|
||||
between_2_3
|
||||
[21666] libc: .symver is used on common symbol
|
||||
[21668] network: resolv: res_init cross-thread broadcast introduces race
|
||||
conditions
|
||||
[21687] math: tgmath.h totalorder, totalordermag return type
|
||||
[21694] locale: Current Glibc Locale Does Not Support Tok-Pisin and Fiji
|
||||
Hindi Locale
|
||||
[21696] libc: Incorrect assumption of of __cpu_mask in
|
||||
posix/sched_cpucount.c
|
||||
[21697] libc: sysdeps/posix/spawni.c: 2 * suspicious condition ?
|
||||
[21706] localedata: yesstr and nostr are missing for Breton [LC_MESSAGES]
|
||||
locale
|
||||
[21707] math: ppc64le: Invalid IFUNC resolver from libgcc calls getauxval,
|
||||
leading to relocation crash
|
||||
[21709] libc: resolv_conf.c:552: update_from_conf: Assertion
|
||||
`resolv_conf_matches (resp, conf)' failed.
|
||||
[21710] localedata: Added Samoan language locale for Samoa
|
||||
[21711] localedata: Pashto yesstr/nostr locale are missing
|
||||
[21715] nptl: sysdeps/nptl/bits/pthreadtypes.h: typedef guard
|
||||
__have_pthread_attr_t can cause redefinition of typedef ‘pthread_attr_t’
|
||||
[21721] localedata: Incorrect Full Weekday names for ks_IN@devanagari
|
||||
[21723] localedata: yesstr/nostr missing for Chinese language locale
|
||||
[21724] localedata: yesstr and nostr are missing for Xhosa [LC_MESSAGES]
|
||||
locale
|
||||
[21727] localedata: yesstr and nostr are missing for Tsonga [LC_MESSAGES]
|
||||
locale
|
||||
[21728] localedata: New Locale for Tongan language
|
||||
[21729] localedata: incorrect LC_NAME fields for hi_IN
|
||||
[21733] localedata: yesstr and nostr are missing for zh_HK
|
||||
[21734] localedata: Missing yesstr and nostr are for kw_GB
|
||||
[21738] libc: misc/tst-preadvwritev2 and misc/tst-preadvwritev64v2 fail
|
||||
[21741] libc: Undefined __memmove_chk_XXX and __memset_chk_XXX in libc.a
|
||||
[21742] libc: _dl_num_cache_relocations is undefined in libc.a
|
||||
[21743] localedata: ks_IN@devanagari: abday strings mismatch the day
|
||||
strings
|
||||
[21744] libc: Tests failing on --enable-tunables --enable-stack-
|
||||
protector=all
|
||||
[21749] localedata: Wrong abbreviated day name (“abday”) for
|
||||
ar_JO/ar_LB/ar_SY
|
||||
[21756] localedata: missing yesstr, nostr for nds_DE and nds_NL
|
||||
[21757] localedata: missing yesstr, nostr for pap_AW and pap_CW
|
||||
[21759] localedata: missing yesstr and nostr for Tigrinya
|
||||
[21760] localedata: Fix LC_MESSAGES and LC_ADDRESS for anp_IN
|
||||
[21766] localedata: Wrong LC_MESSAGES for om_ET Locale
|
||||
[21767] localedata: Missing Bislama locales
|
||||
[21768] localedata: Missing yesstr and nostr for aa_ET
|
||||
[21770] localedata: Missing Field in li_NL
|
||||
[21778] nptl: Robust mutex may deadlock
|
||||
[21779] libc: MicroBlaze segfaults when loading libpthread
|
||||
[21783] localedata: Fix int_select international_call_prefixes
|
||||
[21784] localedata: Inconsistency in country_isbn
|
||||
[21788] localedata: Missing Country Postal Abbreviations
|
||||
[21794] localedata: Added-country_isbn-for-Italy
|
||||
[21795] localedata: Add/Fix country_isbn for France
|
||||
[21796] localedata: Added country_isbn for Republic of Korea
|
||||
[21797] localedata: Fix inconsistency in country_isbn and missing prefixes
|
||||
[21799] localedata: Added int_select international_call_prefixes
|
||||
[21801] localedata: Added int_select international_call_prefixes
|
||||
[21804] nptl: Double semicolon in thread-shared-types.h
|
||||
[21807] localedata: LC_ADDRESS fix for pap_CW
|
||||
[21808] localedata: Fix LC_ADDRESS for pap_AW
|
||||
[21821] localedata: Added country_name in mai_IN
|
||||
[21822] localedata: Fix LC_TIME for mai_IN
|
||||
[21823] localedata: missing yesstr, nostr for sa_IN
|
||||
[21825] localedata: Fix name_mrs for mag_IN
|
||||
[21828] localedata: 2.26 changelog should mention user visible changes
|
||||
with unicode 9.0
|
||||
[21835] localedata: Added Maithili language locale for Nepal
|
||||
[21838] localedata: Removed redundant data for the_NP
|
||||
[21839] localedata: Fix LC_MONETARY for ta_LK
|
||||
[21844] localedata: Fix Latin characters and Months Sequence.
|
||||
[21848] localedata: Fix mai_NP Title Name
|
||||
|
||||
|
||||
Version 2.25
|
||||
|
||||
|
||||
@@ -17,7 +17,9 @@ GNU/Hurd support requires out-of-tree patches that will eventually be
|
||||
incorporated into an official GNU C Library release.
|
||||
|
||||
When working with Linux kernels, this version of the GNU C Library
|
||||
requires Linux kernel version 3.2 or later.
|
||||
requires Linux kernel version 3.2 or later on all architectures except
|
||||
i[4567]86 and x86_64, where Linux kernel version 2.6.32 or later
|
||||
suffices.
|
||||
|
||||
Also note that the shared version of the libgcc_s library must be
|
||||
installed for the pthread library to work correctly.
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
TUNABLE FRAMEWORK
|
||||
=================
|
||||
|
||||
Tunables is a feature in the GNU C Library that allows application authors and
|
||||
distribution maintainers to alter the runtime library behaviour to match their
|
||||
workload.
|
||||
|
||||
The tunable framework allows modules within glibc to register variables that
|
||||
may be tweaked through an environment variable. It aims to enforce a strict
|
||||
namespace rule to bring consistency to naming of these tunable environment
|
||||
variables across the project. This document is a guide for glibc developers to
|
||||
add tunables to the framework.
|
||||
|
||||
ADDING A NEW TUNABLE
|
||||
--------------------
|
||||
|
||||
The TOP_NAMESPACE macro is defined by default as 'glibc'. If distributions
|
||||
intend to add their own tunables, they should do so in a different top
|
||||
namespace by overriding the TOP_NAMESPACE macro for that tunable. Downstream
|
||||
implementations are discouraged from using the 'glibc' top namespace for
|
||||
tunables they don't already have consensus to push upstream.
|
||||
|
||||
There are two steps to adding a tunable:
|
||||
|
||||
1. Add a tunable ID:
|
||||
|
||||
Modules that wish to use the tunables interface must define the
|
||||
TUNABLE_NAMESPACE macro. Following this, for each tunable you want to
|
||||
add, make an entry in elf/dl-tunables.list. The format of the file is as
|
||||
follows:
|
||||
|
||||
TOP_NAMESPACE {
|
||||
NAMESPACE1 {
|
||||
TUNABLE1 {
|
||||
# tunable attributes, one per line
|
||||
}
|
||||
# A tunable with default attributes, i.e. string variable.
|
||||
TUNABLE2
|
||||
TUNABLE3 {
|
||||
# its attributes
|
||||
}
|
||||
}
|
||||
NAMESPACE2 {
|
||||
...
|
||||
}
|
||||
}
|
||||
|
||||
The list of allowed attributes are:
|
||||
|
||||
- type: Data type. Defaults to STRING. Allowed types are:
|
||||
INT_32, SIZE_T and STRING.
|
||||
|
||||
- minval: Optional minimum acceptable value. For a string type
|
||||
this is the minimum length of the value.
|
||||
|
||||
- maxval: Optional maximum acceptable value. For a string type
|
||||
this is the maximum length of the value.
|
||||
|
||||
- env_alias: An alias environment variable
|
||||
|
||||
- is_secure: Specify whether the tunable should be read for setuid
|
||||
binaries. True allows the tunable to be read for
|
||||
setuid binaries while false disables it. Note that
|
||||
even if this is set as true and the value is read, it
|
||||
may not be used if it does not validate against the
|
||||
acceptable values or is not considered safe by the
|
||||
module.
|
||||
|
||||
2. Call either the TUNABLE_SET_VALUE and pass into it the tunable name and a
|
||||
pointer to the variable that should be set with the tunable value.
|
||||
If additional work needs to be done after setting the value, use the
|
||||
TUNABLE_SET_VALUE_WITH_CALLBACK instead and additionally pass a pointer to
|
||||
the function that should be called if the tunable value has been set.
|
||||
|
||||
FUTURE WORK
|
||||
-----------
|
||||
|
||||
The framework currently only allows a one-time initialization of variables
|
||||
through environment variables and in some cases, modification of variables via
|
||||
an API call. A future goals for this project include:
|
||||
|
||||
- Setting system-wide and user-wide defaults for tunables through some
|
||||
mechanism like a configuration file.
|
||||
|
||||
- Allow tweaking of some tunables at runtime
|
||||
@@ -84,7 +84,7 @@ common-generated += dummy.o dummy.c
|
||||
ifneq "$(headers)" ""
|
||||
# Special test of all the installed headers in this directory.
|
||||
tests-special += $(objpfx)check-installed-headers-c.out
|
||||
libof-check-installed-headers-c := testsuite
|
||||
libof-check-installed-headers-c := nonlib
|
||||
$(objpfx)check-installed-headers-c.out: \
|
||||
$(..)scripts/check-installed-headers.sh $(headers)
|
||||
$(SHELL) $(..)scripts/check-installed-headers.sh c \
|
||||
@@ -94,7 +94,7 @@ $(objpfx)check-installed-headers-c.out: \
|
||||
|
||||
ifneq "$(CXX)" ""
|
||||
tests-special += $(objpfx)check-installed-headers-cxx.out
|
||||
libof-check-installed-headers-cxx := testsuite
|
||||
libof-check-installed-headers-cxx := nonlib
|
||||
$(objpfx)check-installed-headers-cxx.out: \
|
||||
$(..)scripts/check-installed-headers.sh $(headers)
|
||||
$(SHELL) $(..)scripts/check-installed-headers.sh c++ \
|
||||
@@ -129,14 +129,12 @@ endif
|
||||
others: $(py-const)
|
||||
|
||||
ifeq ($(run-built-tests),no)
|
||||
tests: $(addprefix $(objpfx),$(filter-out $(tests-unsupported), \
|
||||
$(tests) $(tests-internal)) \
|
||||
tests: $(addprefix $(objpfx),$(filter-out $(tests-unsupported),$(tests)) \
|
||||
$(test-srcs)) $(tests-special) \
|
||||
$(tests-printers-programs)
|
||||
xtests: tests $(xtests-special)
|
||||
else
|
||||
tests: $(tests:%=$(objpfx)%.out) $(tests-internal:%=$(objpfx)%.out) \
|
||||
$(tests-special) $(tests-printers-out)
|
||||
tests: $(tests:%=$(objpfx)%.out) $(tests-special) $(tests-printers-out)
|
||||
xtests: tests $(xtests:%=$(objpfx)%.out) $(xtests-special)
|
||||
endif
|
||||
|
||||
@@ -145,7 +143,7 @@ xtests-special-notdir = $(patsubst $(objpfx)%, %, $(xtests-special))
|
||||
ifeq ($(run-built-tests),no)
|
||||
tests-expected =
|
||||
else
|
||||
tests-expected = $(tests) $(tests-internal) $(tests-printers)
|
||||
tests-expected = $(tests) $(tests-printers)
|
||||
endif
|
||||
tests:
|
||||
$(..)scripts/merge-test-results.sh -s $(objpfx) $(subdir) \
|
||||
@@ -158,7 +156,7 @@ xtests:
|
||||
|
||||
ifeq ($(build-programs),yes)
|
||||
binaries-all-notests = $(others) $(sysdep-others)
|
||||
binaries-all-tests = $(tests) $(tests-internal) $(xtests) $(test-srcs)
|
||||
binaries-all-tests = $(tests) $(xtests) $(test-srcs)
|
||||
binaries-all = $(binaries-all-notests) $(binaries-all-tests)
|
||||
binaries-static-notests = $(others-static)
|
||||
binaries-static-tests = $(tests-static) $(xtests-static)
|
||||
@@ -172,7 +170,7 @@ binaries-pie-notests =
|
||||
endif
|
||||
else
|
||||
binaries-all-notests =
|
||||
binaries-all-tests = $(tests) $(tests-internal) $(xtests) $(test-srcs)
|
||||
binaries-all-tests = $(tests) $(xtests) $(test-srcs)
|
||||
binaries-all = $(binaries-all-tests)
|
||||
binaries-static-notests =
|
||||
binaries-static-tests =
|
||||
@@ -232,7 +230,7 @@ $(addprefix $(objpfx),$(binaries-static-tests)): %: %.o \
|
||||
$(+link-static-tests)
|
||||
endif
|
||||
|
||||
ifneq "$(strip $(tests) $(tests-internal) $(xtests) $(test-srcs))" ""
|
||||
ifneq "$(strip $(tests) $(xtests) $(test-srcs))" ""
|
||||
# These are the implicit rules for making test outputs
|
||||
# from the test programs and whatever input files are present.
|
||||
|
||||
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
<unistd.h>:
|
||||
|
||||
lssek: Probably should be __wur but lseek(fd,SEEK_SET,0) will succeed if
|
||||
the descriptor is fine.
|
||||
lseek64: same
|
||||
|
||||
<stdio.h>:
|
||||
|
||||
setvbuf: if stream and buffer are fine and other parameters constant,
|
||||
it cannot really fail.
|
||||
fseek: see lseek
|
||||
fseeko: likewise
|
||||
fgetpos: similarly
|
||||
fsetpos: likewise
|
||||
|
||||
|
||||
<stdlib.h>:
|
||||
|
||||
atexit: it is guaranteed that a certain number of handlers can be
|
||||
registered, so some calls might need not be checked
|
||||
on_exit: same
|
||||
random functions: one might want to discard a number of results. In any
|
||||
case, no security problem
|
||||
|
||||
|
||||
putenv: probably SHOULD be marked, but we'll wait a bit.
|
||||
setenv: likewise
|
||||
unsetenv: likewise
|
||||
clearenv: likewise
|
||||
|
||||
mbstowcs: probably SHOULD be marked
|
||||
wcstombs: likewise
|
||||
|
||||
ptsname_r: probably SHOULD be marked
|
||||
@@ -28,5 +28,7 @@
|
||||
|
||||
.*-.*-syllable.* 5 2.0.0 # just an arbitrary value
|
||||
|
||||
.*-.*-nacl.* 6 42.0.0 # earliest compatible Chromium version
|
||||
|
||||
# There is no catch-all default here because every supported OS that uses
|
||||
# ELF must have its own unique ABI tag.
|
||||
|
||||
Vendored
-2
@@ -121,8 +121,6 @@ OBJDUMP=`$CC -print-prog-name=objdump`
|
||||
AC_SUBST(OBJDUMP)
|
||||
OBJCOPY=`$CC -print-prog-name=objcopy`
|
||||
AC_SUBST(OBJCOPY)
|
||||
GPROF=`$CC -print-prog-name=gprof`
|
||||
AC_SUBST(GPROF)
|
||||
|
||||
# Determine whether we are using GNU binutils.
|
||||
AC_CACHE_CHECK(whether $AS is GNU as, libc_cv_prog_as_gnu,
|
||||
|
||||
+7
-7
@@ -24,17 +24,17 @@
|
||||
#include <ctype.h>
|
||||
#include <getopt.h>
|
||||
#include <limits.h>
|
||||
|
||||
#define __need_error_t
|
||||
#include <errno.h>
|
||||
|
||||
#ifndef __error_t_defined
|
||||
typedef int error_t;
|
||||
# define __error_t_defined
|
||||
#endif
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
/* error_t may or may not be available from errno.h, depending on the
|
||||
operating system. */
|
||||
#ifndef __error_t_defined
|
||||
# define __error_t_defined 1
|
||||
typedef int error_t;
|
||||
#endif
|
||||
|
||||
/* A description of a particular option. A pointer to an array of
|
||||
these is passed in the OPTIONS field of an argp structure. Each option
|
||||
entry can correspond to one long option and/or one short option; more
|
||||
|
||||
+1
-10
@@ -25,15 +25,6 @@ include ../Makeconfig
|
||||
headers := assert.h
|
||||
|
||||
routines := assert assert-perr __assert
|
||||
tests := test-assert test-assert-perr tst-assert-c++ tst-assert-g++
|
||||
|
||||
ifeq ($(have-cxx-thread_local),yes)
|
||||
CFLAGS-tst-assert-c++.o = -std=c++11
|
||||
LDLIBS-tst-assert-c++ = -lstdc++
|
||||
CFLAGS-tst-assert-g++.o = -std=gnu++11
|
||||
LDLIBS-tst-assert-g++ = -lstdc++
|
||||
else
|
||||
tests-unsupported += tst-assert-c++ tst-assert-g++
|
||||
endif
|
||||
tests := test-assert test-assert-perr
|
||||
|
||||
include ../Rules
|
||||
|
||||
+4
-14
@@ -85,29 +85,19 @@ __END_DECLS
|
||||
/* When possible, define assert so that it does not add extra
|
||||
parentheses around EXPR. Otherwise, those added parentheses would
|
||||
suppress warnings we'd expect to be detected by gcc's -Wparentheses. */
|
||||
# if defined __cplusplus
|
||||
# define assert(expr) \
|
||||
(static_cast <bool> (expr) \
|
||||
? void (0) \
|
||||
: __assert_fail (#expr, __FILE__, __LINE__, __ASSERT_FUNCTION))
|
||||
# elif !defined __GNUC__ || defined __STRICT_ANSI__
|
||||
# if !defined __GNUC__ || defined __STRICT_ANSI__
|
||||
# define assert(expr) \
|
||||
((expr) \
|
||||
? __ASSERT_VOID_CAST (0) \
|
||||
: __assert_fail (#expr, __FILE__, __LINE__, __ASSERT_FUNCTION))
|
||||
# else
|
||||
/* The first occurrence of EXPR is not evaluated due to the sizeof,
|
||||
but will trigger any pedantic warnings masked by the __extension__
|
||||
for the second occurrence. The ternary operator is required to
|
||||
support function pointers and bit fields in this context, and to
|
||||
suppress the evaluation of variable length arrays. */
|
||||
# define assert(expr) \
|
||||
((void) sizeof ((expr) ? 1 : 0), __extension__ ({ \
|
||||
({ \
|
||||
if (expr) \
|
||||
; /* empty */ \
|
||||
else \
|
||||
__assert_fail (#expr, __FILE__, __LINE__, __ASSERT_FUNCTION); \
|
||||
}))
|
||||
})
|
||||
# endif
|
||||
|
||||
# ifdef __USE_GNU
|
||||
@@ -123,7 +113,7 @@ __END_DECLS
|
||||
C9x has a similar variable called __func__, but prefer the GCC one since
|
||||
it demangles C++ function names. */
|
||||
# if defined __cplusplus ? __GNUC_PREREQ (2, 6) : __GNUC_PREREQ (2, 4)
|
||||
# define __ASSERT_FUNCTION __extension__ __PRETTY_FUNCTION__
|
||||
# define __ASSERT_FUNCTION __PRETTY_FUNCTION__
|
||||
# else
|
||||
# if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
|
||||
# define __ASSERT_FUNCTION __func__
|
||||
|
||||
@@ -1,78 +0,0 @@
|
||||
/* Tests for interactions between C++ and assert.
|
||||
Copyright (C) 2017 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
/* The C++ standard requires that if the assert argument is a constant
|
||||
subexpression, then the assert itself is one, too. */
|
||||
constexpr int
|
||||
check_constexpr ()
|
||||
{
|
||||
return (assert (true), 1);
|
||||
}
|
||||
|
||||
/* Objects of this class can be contextually converted to bool, but
|
||||
cannot be compared to int. */
|
||||
struct no_int
|
||||
{
|
||||
no_int () = default;
|
||||
no_int (const no_int &) = delete;
|
||||
|
||||
explicit operator bool () const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool operator! () const; /* No definition. */
|
||||
template <class T> bool operator== (T) const; /* No definition. */
|
||||
template <class T> bool operator!= (T) const; /* No definition. */
|
||||
};
|
||||
|
||||
/* This class tests that operator== is not used by assert. */
|
||||
struct bool_and_int
|
||||
{
|
||||
bool_and_int () = default;
|
||||
bool_and_int (const no_int &) = delete;
|
||||
|
||||
explicit operator bool () const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool operator! () const; /* No definition. */
|
||||
template <class T> bool operator== (T) const; /* No definition. */
|
||||
template <class T> bool operator!= (T) const; /* No definition. */
|
||||
};
|
||||
|
||||
static int
|
||||
do_test ()
|
||||
{
|
||||
{
|
||||
no_int value;
|
||||
assert (value);
|
||||
}
|
||||
|
||||
{
|
||||
bool_and_int value;
|
||||
assert (value);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#include <support/test-driver.c>
|
||||
+8
-11
@@ -23,9 +23,9 @@ subdir := benchtests
|
||||
include ../Makeconfig
|
||||
bench-math := acos acosh asin asinh atan atanh cos cosh exp exp2 log log2 \
|
||||
modf pow rint sin sincos sinh sqrt tan tanh fmin fmax fminf \
|
||||
fmaxf powf trunc truncf expf exp2f logf log2f
|
||||
fmaxf
|
||||
|
||||
bench-pthread := pthread_once thread_create
|
||||
bench-pthread := pthread_once
|
||||
|
||||
bench-string := ffs ffsll
|
||||
|
||||
@@ -37,7 +37,7 @@ string-benchset := bcopy bzero memccpy memchr memcmp memcpy memmem memmove \
|
||||
strcat strchr strchrnul strcmp strcpy strcspn strlen \
|
||||
strncasecmp strncat strncmp strncpy strnlen strpbrk strrchr \
|
||||
strspn strstr strcpy_chk stpcpy_chk memrchr strsep strtok \
|
||||
strcoll memcpy-large memcpy-random memmove-large memset-large
|
||||
strcoll memcpy-large memmove-large memset-large
|
||||
|
||||
# Build and run locale-dependent benchmarks only if we're building natively.
|
||||
ifeq (no,$(cross-compiling))
|
||||
@@ -76,8 +76,6 @@ CFLAGS-bench-fmin.c += -fno-builtin
|
||||
CFLAGS-bench-fminf.c += -fno-builtin
|
||||
CFLAGS-bench-fmax.c += -fno-builtin
|
||||
CFLAGS-bench-fmaxf.c += -fno-builtin
|
||||
CFLAGS-bench-trunc.c += -fno-builtin
|
||||
CFLAGS-bench-truncf.c += -fno-builtin
|
||||
|
||||
bench-malloc := malloc-thread
|
||||
|
||||
@@ -95,11 +93,6 @@ $(objpfx)bench-malloc-thread: $(shared-thread-library)
|
||||
# affect their performance.
|
||||
.NOTPARALLEL:
|
||||
|
||||
bench-extra-objs = json-lib.o
|
||||
|
||||
extra-objs += $(bench-extra-objs)
|
||||
others-extras = $(bench-extra-objs)
|
||||
|
||||
include ../Rules
|
||||
|
||||
binaries-bench := $(addprefix $(objpfx)bench-,$(bench))
|
||||
@@ -130,7 +123,11 @@ endif
|
||||
cpp-srcs-left := $(binaries-benchset:=.c) $(binaries-bench:=.c) \
|
||||
$(binaries-bench-malloc:=.c)
|
||||
lib := nonlib
|
||||
include $(patsubst %,$(..)libof-iterator.mk,$(cpp-srcs-left))
|
||||
include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
|
||||
|
||||
bench-extra-objs = json-lib.o
|
||||
|
||||
extra-objs += $(bench-extra-objs)
|
||||
|
||||
bench-deps := bench-skeleton.c bench-timing.h Makefile
|
||||
|
||||
|
||||
@@ -102,12 +102,6 @@ the same file by using the `name' directive that looks something like this:
|
||||
See the pow-inputs file for an example of what such a partitioned input file
|
||||
would look like.
|
||||
|
||||
It is also possible to measure throughput of a (partial) trace extracted from
|
||||
a real workload. In this case the whole trace is iterated over multiple times
|
||||
rather than repeating every input multiple times. This can be done via:
|
||||
|
||||
##name: workload-<name>
|
||||
|
||||
Benchmark Sets:
|
||||
==============
|
||||
|
||||
@@ -122,14 +116,3 @@ To add a benchset for `foo':
|
||||
- Write your bench-foo.c that prints out the measurements to stdout.
|
||||
- On execution, a bench-foo.out is created in $(objpfx) with the contents of
|
||||
stdout.
|
||||
|
||||
Reading String Benchmark Results:
|
||||
================================
|
||||
|
||||
Some of the string benchmark results are now in JSON to make it easier to read
|
||||
in scripts. Use the benchtests/compare_strings.py script to show the results
|
||||
in a tabular format, generate graphs and more. Run
|
||||
|
||||
benchtests/scripts/compare_strings.py -h
|
||||
|
||||
for usage information.
|
||||
|
||||
@@ -58,9 +58,25 @@ static void
|
||||
do_one_test (impl_t *impl, void *dst, const void *src, int c, size_t len,
|
||||
size_t n)
|
||||
{
|
||||
void *expect = len > n ? NULL : (char *) dst + len;
|
||||
size_t i, iters = INNER_LOOP_ITERS;
|
||||
timing_t start, stop, cur;
|
||||
|
||||
if (CALL (impl, dst, src, c, n) != expect)
|
||||
{
|
||||
error (0, 0, "Wrong result in function %s %p %p", impl->name,
|
||||
CALL (impl, dst, src, c, n), expect);
|
||||
ret = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
if (memcmp (dst, src, len > n ? n : len) != 0)
|
||||
{
|
||||
error (0, 0, "Wrong result in function %s", impl->name);
|
||||
ret = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
TIMING_NOW (start);
|
||||
for (i = 0; i < iters; ++i)
|
||||
{
|
||||
|
||||
+15
-18
@@ -59,11 +59,20 @@ SIMPLE_MEMCHR (const CHAR *s, int c, size_t n)
|
||||
#endif /* !USE_AS_MEMRCHR */
|
||||
|
||||
static void
|
||||
do_one_test (impl_t *impl, const CHAR *s, int c, size_t n)
|
||||
do_one_test (impl_t *impl, const CHAR *s, int c, size_t n, CHAR *exp_res)
|
||||
{
|
||||
CHAR *res = CALL (impl, s, c, n);
|
||||
size_t i, iters = INNER_LOOP_ITERS;
|
||||
timing_t start, stop, cur;
|
||||
|
||||
if (res != exp_res)
|
||||
{
|
||||
error (0, 0, "Wrong result in function %s %p %p", impl->name,
|
||||
res, exp_res);
|
||||
ret = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
TIMING_NOW (start);
|
||||
for (i = 0; i < iters; ++i)
|
||||
{
|
||||
@@ -80,6 +89,7 @@ static void
|
||||
do_test (size_t align, size_t pos, size_t len, int seek_char)
|
||||
{
|
||||
size_t i;
|
||||
CHAR *result;
|
||||
|
||||
align &= 7;
|
||||
if ((align + len) * sizeof (CHAR) >= page_size)
|
||||
@@ -99,17 +109,18 @@ do_test (size_t align, size_t pos, size_t len, int seek_char)
|
||||
{
|
||||
buf[align + pos] = seek_char;
|
||||
buf[align + len] = -seek_char;
|
||||
result = (CHAR *) (buf + align + pos);
|
||||
}
|
||||
else
|
||||
{
|
||||
result = NULL;
|
||||
buf[align + len] = seek_char;
|
||||
}
|
||||
|
||||
printf ("Length %4zd, position %4zd, alignment %2zd:",
|
||||
len, pos, align);
|
||||
printf ("Length %4zd, alignment %2zd:", pos, align);
|
||||
|
||||
FOR_EACH_IMPL (impl, 0)
|
||||
do_one_test (impl, (CHAR *) (buf + align), seek_char, len);
|
||||
do_one_test (impl, (CHAR *) (buf + align), seek_char, len, result);
|
||||
|
||||
putchar ('\n');
|
||||
}
|
||||
@@ -132,25 +143,11 @@ test_main (void)
|
||||
do_test (i, 64, 256, 23);
|
||||
do_test (0, 16 << i, 2048, 0);
|
||||
do_test (i, 64, 256, 0);
|
||||
#ifdef USE_AS_MEMRCHR
|
||||
/* Also test the position close to the beginning for memrchr. */
|
||||
do_test (0, i, 256, 23);
|
||||
do_test (0, i, 256, 0);
|
||||
do_test (i, i, 256, 23);
|
||||
do_test (i, i, 256, 0);
|
||||
#endif
|
||||
}
|
||||
for (i = 1; i < 32; ++i)
|
||||
{
|
||||
do_test (0, i, i + 1, 23);
|
||||
do_test (0, i, i + 1, 0);
|
||||
do_test (i, i, i + 1, 23);
|
||||
do_test (i, i, i + 1, 0);
|
||||
#ifdef USE_AS_MEMRCHR
|
||||
/* Also test the position close to the beginning for memrchr. */
|
||||
do_test (0, 1, i + 1, 23);
|
||||
do_test (0, 2, i + 1, 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
||||
@@ -28,17 +28,35 @@
|
||||
IMPL (memcpy, 1)
|
||||
#endif
|
||||
|
||||
#include "json-lib.h"
|
||||
|
||||
typedef char *(*proto_t) (char *, const char *, size_t);
|
||||
|
||||
static void
|
||||
do_one_test (json_ctx_t *json_ctx, impl_t *impl, char *dst, const char *src,
|
||||
do_one_test (impl_t *impl, char *dst, const char *src,
|
||||
size_t len)
|
||||
{
|
||||
size_t i, iters = 16;
|
||||
timing_t start, stop, cur;
|
||||
|
||||
/* Must clear the destination buffer updated by the previous run. */
|
||||
for (i = 0; i < len; i++)
|
||||
dst[i] = 0;
|
||||
|
||||
if (CALL (impl, dst, src, len) != MEMCPY_RESULT (dst, len))
|
||||
{
|
||||
error (0, 0, "Wrong result in function %s %p %p", impl->name,
|
||||
CALL (impl, dst, src, len), MEMCPY_RESULT (dst, len));
|
||||
ret = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
if (memcmp (dst, src, len) != 0)
|
||||
{
|
||||
error (0, 0, "Wrong result in function %s dst \"%s\" src \"%s\"",
|
||||
impl->name, dst, src);
|
||||
ret = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
TIMING_NOW (start);
|
||||
for (i = 0; i < iters; ++i)
|
||||
{
|
||||
@@ -48,11 +66,11 @@ do_one_test (json_ctx_t *json_ctx, impl_t *impl, char *dst, const char *src,
|
||||
|
||||
TIMING_DIFF (cur, start, stop);
|
||||
|
||||
json_element_double (json_ctx, (double) cur / (double) iters);
|
||||
TIMING_PRINT_MEAN ((double) cur, (double) iters);
|
||||
}
|
||||
|
||||
static void
|
||||
do_test (json_ctx_t *json_ctx, size_t align1, size_t align2, size_t len)
|
||||
do_test (size_t align1, size_t align2, size_t len)
|
||||
{
|
||||
size_t i, j;
|
||||
char *s1, *s2;
|
||||
@@ -71,55 +89,34 @@ do_test (json_ctx_t *json_ctx, size_t align1, size_t align2, size_t len)
|
||||
for (i = 0, j = 1; i < len; i++, j += 23)
|
||||
s1[i] = j;
|
||||
|
||||
json_element_object_begin (json_ctx);
|
||||
json_attr_uint (json_ctx, "length", (double) len);
|
||||
json_attr_uint (json_ctx, "align1", (double) align1);
|
||||
json_attr_uint (json_ctx, "align2", (double) align2);
|
||||
json_array_begin (json_ctx, "timings");
|
||||
printf ("Length %4zd, alignment %2zd/%2zd:", len, align1, align2);
|
||||
|
||||
FOR_EACH_IMPL (impl, 0)
|
||||
do_one_test (json_ctx, impl, s2, s1, len);
|
||||
do_one_test (impl, s2, s1, len);
|
||||
|
||||
json_array_end (json_ctx);
|
||||
json_element_object_end (json_ctx);
|
||||
putchar ('\n');
|
||||
}
|
||||
|
||||
int
|
||||
test_main (void)
|
||||
{
|
||||
json_ctx_t json_ctx;
|
||||
size_t i;
|
||||
|
||||
test_init ();
|
||||
|
||||
json_init (&json_ctx, 0, stdout);
|
||||
|
||||
json_document_begin (&json_ctx);
|
||||
json_attr_string (&json_ctx, "timing_type", TIMING_TYPE);
|
||||
|
||||
json_attr_object_begin (&json_ctx, "functions");
|
||||
json_attr_object_begin (&json_ctx, TEST_NAME);
|
||||
json_attr_string (&json_ctx, "bench-variant", "large");
|
||||
|
||||
json_array_begin (&json_ctx, "ifuncs");
|
||||
printf ("%23s", "");
|
||||
FOR_EACH_IMPL (impl, 0)
|
||||
json_element_string (&json_ctx, impl->name);
|
||||
json_array_end (&json_ctx);
|
||||
printf ("\t%s", impl->name);
|
||||
putchar ('\n');
|
||||
|
||||
json_array_begin (&json_ctx, "results");
|
||||
for (i = START_SIZE; i <= MIN_PAGE_SIZE; i <<= 1)
|
||||
{
|
||||
do_test (&json_ctx, 0, 0, i + 7);
|
||||
do_test (&json_ctx, 0, 3, i + 15);
|
||||
do_test (&json_ctx, 3, 0, i + 31);
|
||||
do_test (&json_ctx, 3, 5, i + 63);
|
||||
do_test (0, 0, i + 7);
|
||||
do_test (0, 3, i + 15);
|
||||
do_test (3, 0, i + 31);
|
||||
do_test (3, 5, i + 63);
|
||||
}
|
||||
|
||||
json_array_end (&json_ctx);
|
||||
json_attr_object_end (&json_ctx);
|
||||
json_attr_object_end (&json_ctx);
|
||||
json_document_end (&json_ctx);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,179 +0,0 @@
|
||||
/* Measure memcpy performance.
|
||||
Copyright (C) 2016-2017 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#define MIN_PAGE_SIZE 131072
|
||||
#define TEST_MAIN
|
||||
#define TEST_NAME "memcpy"
|
||||
#include "bench-string.h"
|
||||
#include <assert.h>
|
||||
#include "json-lib.h"
|
||||
|
||||
IMPL (memcpy, 1)
|
||||
|
||||
#define NUM_COPIES 4096
|
||||
|
||||
typedef struct { uint16_t size; uint16_t freq; } freq_data_t;
|
||||
typedef struct { uint8_t align; uint8_t freq; } align_data_t;
|
||||
|
||||
#define SIZE_NUM 1024
|
||||
#define SIZE_MASK (SIZE_NUM-1)
|
||||
static uint8_t size_arr[SIZE_NUM];
|
||||
|
||||
/* Frequency data for memcpy of less than 256 bytes based on SPEC2006. */
|
||||
static freq_data_t size_freq[] =
|
||||
{
|
||||
{ 8, 576}, {104, 94}, { 24, 78}, { 48, 58}, { 32, 48}, { 16, 46},
|
||||
{ 1, 30}, { 96, 12}, { 72, 11}, {216, 11}, {192, 8}, { 12, 7},
|
||||
{144, 5}, { 2, 4}, { 64, 4}, {120, 4}, { 4, 3}, { 40, 2},
|
||||
{ 7, 2}, {168, 2}, {160, 2}, {128, 1}, { 3, 1}, { 9, 1},
|
||||
{176, 1}, {240, 1}, { 11, 1}, { 0, 1}, { 5, 1}, { 6, 1},
|
||||
{ 80, 1}, { 52, 1}, {152, 1}, { 10, 1}, { 56, 1}, { 51, 1},
|
||||
{ 14, 1}, {208, 1}, { 0, 0}
|
||||
};
|
||||
|
||||
#define ALIGN_NUM 256
|
||||
#define ALIGN_MASK (ALIGN_NUM-1)
|
||||
static uint8_t src_align_arr[ALIGN_NUM];
|
||||
static uint8_t dst_align_arr[ALIGN_NUM];
|
||||
|
||||
/* Source alignment frequency for memcpy based on SPEC2006. */
|
||||
static align_data_t src_align_freq[] =
|
||||
{
|
||||
{16, 144}, {8, 86}, {3, 23}, {1, 3}, {0, 0}
|
||||
};
|
||||
|
||||
/* Destination alignment frequency for memcpy based on SPEC2006. */
|
||||
static align_data_t dst_align_freq[] =
|
||||
{
|
||||
{16, 197}, {8, 30}, {3, 23}, {1, 6}, {0, 0}
|
||||
};
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint16_t src;
|
||||
uint16_t dst;
|
||||
uint16_t len;
|
||||
} copy_t;
|
||||
|
||||
static copy_t copy[NUM_COPIES];
|
||||
|
||||
typedef char *(*proto_t) (char *, const char *, size_t);
|
||||
|
||||
static void
|
||||
init_copy_distribution (void)
|
||||
{
|
||||
int i, j, freq, size, n;
|
||||
|
||||
for (n = i = 0; (freq = size_freq[i].freq) != 0; i++)
|
||||
for (j = 0, size = size_freq[i].size; j < freq; j++)
|
||||
size_arr[n++] = size;
|
||||
assert (n == SIZE_NUM);
|
||||
|
||||
for (n = i = 0; (freq = src_align_freq[i].freq) != 0; i++)
|
||||
for (j = 0, size = src_align_freq[i].align; j < freq; j++)
|
||||
src_align_arr[n++] = size - 1;
|
||||
assert (n == ALIGN_NUM);
|
||||
|
||||
for (n = i = 0; (freq = dst_align_freq[i].freq) != 0; i++)
|
||||
for (j = 0, size = dst_align_freq[i].align; j < freq; j++)
|
||||
dst_align_arr[n++] = size - 1;
|
||||
assert (n == ALIGN_NUM);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
do_one_test (json_ctx_t *json_ctx, impl_t *impl, char *dst, char *src,
|
||||
copy_t *copy, size_t n)
|
||||
{
|
||||
timing_t start, stop, cur;
|
||||
size_t iters = INNER_LOOP_ITERS * 20;
|
||||
|
||||
TIMING_NOW (start);
|
||||
for (int i = 0; i < iters; ++i)
|
||||
for (int j = 0; j < n; j++)
|
||||
CALL (impl, dst + copy[j].dst, src + copy[j].src, copy[j].len);
|
||||
TIMING_NOW (stop);
|
||||
|
||||
TIMING_DIFF (cur, start, stop);
|
||||
|
||||
json_element_double (json_ctx, (double) cur / (double) iters);
|
||||
}
|
||||
|
||||
static void
|
||||
do_test (json_ctx_t *json_ctx, size_t max_size)
|
||||
{
|
||||
for (int i = 0; i < max_size; i++)
|
||||
buf1[i] = i * 3;
|
||||
|
||||
/* Create a random set of copies with the given size and alignment
|
||||
distributions. */
|
||||
for (int i = 0; i < NUM_COPIES; i++)
|
||||
{
|
||||
copy[i].dst = (rand () & (max_size - 1)) | 1;
|
||||
copy[i].dst &= ~dst_align_arr[rand () & ALIGN_MASK];
|
||||
copy[i].src = (rand () & (max_size - 1)) | 3;
|
||||
copy[i].src &= ~src_align_arr[rand () & ALIGN_MASK];
|
||||
copy[i].len = size_arr[rand () & SIZE_MASK];
|
||||
}
|
||||
|
||||
json_element_object_begin (json_ctx);
|
||||
json_attr_uint (json_ctx, "max-size", (double) max_size);
|
||||
json_array_begin (json_ctx, "timings");
|
||||
|
||||
FOR_EACH_IMPL (impl, 0)
|
||||
do_one_test (json_ctx, impl, (char *) buf2, (char *) buf1, copy, NUM_COPIES);
|
||||
|
||||
json_array_end (json_ctx);
|
||||
json_element_object_end (json_ctx);
|
||||
}
|
||||
|
||||
int
|
||||
test_main (void)
|
||||
{
|
||||
json_ctx_t json_ctx;
|
||||
|
||||
test_init ();
|
||||
init_copy_distribution ();
|
||||
|
||||
json_init (&json_ctx, 0, stdout);
|
||||
|
||||
json_document_begin (&json_ctx);
|
||||
json_attr_string (&json_ctx, "timing_type", TIMING_TYPE);
|
||||
|
||||
json_attr_object_begin (&json_ctx, "functions");
|
||||
json_attr_object_begin (&json_ctx, TEST_NAME);
|
||||
json_attr_string (&json_ctx, "bench-variant", "random");
|
||||
|
||||
json_array_begin (&json_ctx, "ifuncs");
|
||||
FOR_EACH_IMPL (impl, 0)
|
||||
json_element_string (&json_ctx, impl->name);
|
||||
json_array_end (&json_ctx);
|
||||
|
||||
json_array_begin (&json_ctx, "results");
|
||||
for (int i = 4; i <= 64; i = i * 2)
|
||||
do_test (&json_ctx, i * 1024);
|
||||
|
||||
json_array_end (&json_ctx);
|
||||
json_attr_object_end (&json_ctx);
|
||||
json_attr_object_end (&json_ctx);
|
||||
json_document_end (&json_ctx);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
#include <support/test-driver.c>
|
||||
+46
-49
@@ -46,17 +46,35 @@ builtin_memcpy (char *dst, const char *src, size_t n)
|
||||
}
|
||||
#endif
|
||||
|
||||
# include "json-lib.h"
|
||||
|
||||
typedef char *(*proto_t) (char *, const char *, size_t);
|
||||
|
||||
static void
|
||||
do_one_test (json_ctx_t *json_ctx, impl_t *impl, char *dst, const char *src,
|
||||
do_one_test (impl_t *impl, char *dst, const char *src,
|
||||
size_t len)
|
||||
{
|
||||
size_t i, iters = INNER_LOOP_ITERS;
|
||||
timing_t start, stop, cur;
|
||||
|
||||
/* Must clear the destination buffer set by the previous run. */
|
||||
for (i = 0; i < len; i++)
|
||||
dst[i] = 0;
|
||||
|
||||
if (CALL (impl, dst, src, len) != MEMCPY_RESULT (dst, len))
|
||||
{
|
||||
error (0, 0, "Wrong result in function %s %p %p", impl->name,
|
||||
CALL (impl, dst, src, len), MEMCPY_RESULT (dst, len));
|
||||
ret = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
if (memcmp (dst, src, len) != 0)
|
||||
{
|
||||
error (0, 0, "Wrong result in function %s dst \"%s\" src \"%s\"",
|
||||
impl->name, dst, src);
|
||||
ret = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
TIMING_NOW (start);
|
||||
for (i = 0; i < iters; ++i)
|
||||
{
|
||||
@@ -66,11 +84,11 @@ do_one_test (json_ctx_t *json_ctx, impl_t *impl, char *dst, const char *src,
|
||||
|
||||
TIMING_DIFF (cur, start, stop);
|
||||
|
||||
json_element_double (json_ctx, (double) cur / (double) iters);
|
||||
TIMING_PRINT_MEAN ((double) cur, (double) iters);
|
||||
}
|
||||
|
||||
static void
|
||||
do_test (json_ctx_t *json_ctx, size_t align1, size_t align2, size_t len)
|
||||
do_test (size_t align1, size_t align2, size_t len)
|
||||
{
|
||||
size_t i, j;
|
||||
char *s1, *s2;
|
||||
@@ -89,82 +107,61 @@ do_test (json_ctx_t *json_ctx, size_t align1, size_t align2, size_t len)
|
||||
for (i = 0, j = 1; i < len; i++, j += 23)
|
||||
s1[i] = j;
|
||||
|
||||
json_element_object_begin (json_ctx);
|
||||
json_attr_uint (json_ctx, "length", (double) len);
|
||||
json_attr_uint (json_ctx, "align1", (double) align1);
|
||||
json_attr_uint (json_ctx, "align2", (double) align2);
|
||||
json_array_begin (json_ctx, "timings");
|
||||
printf ("Length %4zd, alignment %2zd/%2zd:", len, align1, align2);
|
||||
|
||||
FOR_EACH_IMPL (impl, 0)
|
||||
do_one_test (json_ctx, impl, s2, s1, len);
|
||||
do_one_test (impl, s2, s1, len);
|
||||
|
||||
json_array_end (json_ctx);
|
||||
json_element_object_end (json_ctx);
|
||||
putchar ('\n');
|
||||
}
|
||||
|
||||
int
|
||||
test_main (void)
|
||||
{
|
||||
json_ctx_t json_ctx;
|
||||
size_t i;
|
||||
|
||||
test_init ();
|
||||
|
||||
json_init (&json_ctx, 0, stdout);
|
||||
|
||||
json_document_begin (&json_ctx);
|
||||
json_attr_string (&json_ctx, "timing_type", TIMING_TYPE);
|
||||
|
||||
json_attr_object_begin (&json_ctx, "functions");
|
||||
json_attr_object_begin (&json_ctx, TEST_NAME);
|
||||
json_attr_string (&json_ctx, "bench-variant", "default");
|
||||
|
||||
json_array_begin (&json_ctx, "ifuncs");
|
||||
printf ("%23s", "");
|
||||
FOR_EACH_IMPL (impl, 0)
|
||||
json_element_string (&json_ctx, impl->name);
|
||||
json_array_end (&json_ctx);
|
||||
printf ("\t%s", impl->name);
|
||||
putchar ('\n');
|
||||
|
||||
json_array_begin (&json_ctx, "results");
|
||||
for (i = 0; i < 18; ++i)
|
||||
{
|
||||
do_test (&json_ctx, 0, 0, 1 << i);
|
||||
do_test (&json_ctx, i, 0, 1 << i);
|
||||
do_test (&json_ctx, 0, i, 1 << i);
|
||||
do_test (&json_ctx, i, i, 1 << i);
|
||||
do_test (0, 0, 1 << i);
|
||||
do_test (i, 0, 1 << i);
|
||||
do_test (0, i, 1 << i);
|
||||
do_test (i, i, 1 << i);
|
||||
}
|
||||
|
||||
for (i = 0; i < 32; ++i)
|
||||
{
|
||||
do_test (&json_ctx, 0, 0, i);
|
||||
do_test (&json_ctx, i, 0, i);
|
||||
do_test (&json_ctx, 0, i, i);
|
||||
do_test (&json_ctx, i, i, i);
|
||||
do_test (0, 0, i);
|
||||
do_test (i, 0, i);
|
||||
do_test (0, i, i);
|
||||
do_test (i, i, i);
|
||||
}
|
||||
|
||||
for (i = 3; i < 32; ++i)
|
||||
{
|
||||
if ((i & (i - 1)) == 0)
|
||||
continue;
|
||||
do_test (&json_ctx, 0, 0, 16 * i);
|
||||
do_test (&json_ctx, i, 0, 16 * i);
|
||||
do_test (&json_ctx, 0, i, 16 * i);
|
||||
do_test (&json_ctx, i, i, 16 * i);
|
||||
do_test (0, 0, 16 * i);
|
||||
do_test (i, 0, 16 * i);
|
||||
do_test (0, i, 16 * i);
|
||||
do_test (i, i, 16 * i);
|
||||
}
|
||||
|
||||
for (i = 32; i < 64; ++i)
|
||||
{
|
||||
do_test (&json_ctx, 0, 0, 32 * i);
|
||||
do_test (&json_ctx, i, 0, 32 * i);
|
||||
do_test (&json_ctx, 0, i, 32 * i);
|
||||
do_test (&json_ctx, i, i, 32 * i);
|
||||
do_test (0, 0, 32 * i);
|
||||
do_test (i, 0, 32 * i);
|
||||
do_test (0, i, 32 * i);
|
||||
do_test (i, i, 32 * i);
|
||||
}
|
||||
|
||||
do_test (&json_ctx, 0, 0, getpagesize ());
|
||||
|
||||
json_array_end (&json_ctx);
|
||||
json_attr_object_end (&json_ctx);
|
||||
json_attr_object_end (&json_ctx);
|
||||
json_document_end (&json_ctx);
|
||||
do_test (0, 0, getpagesize ());
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -23,19 +23,39 @@
|
||||
#define TEST_NAME "memmove"
|
||||
#define TIMEOUT (20 * 60)
|
||||
#include "bench-string.h"
|
||||
#include "json-lib.h"
|
||||
|
||||
IMPL (memmove, 1)
|
||||
|
||||
typedef char *(*proto_t) (char *, const char *, size_t);
|
||||
|
||||
static void
|
||||
do_one_test (json_ctx_t *json_ctx, impl_t *impl, char *dst, char *src, const
|
||||
char *orig_src, size_t len)
|
||||
do_one_test (impl_t *impl, char *dst, char *src, const char *orig_src,
|
||||
size_t len)
|
||||
{
|
||||
size_t i, iters = 16;
|
||||
timing_t start, stop, cur;
|
||||
|
||||
/* This also clears the destination buffer updated by the previous
|
||||
run. */
|
||||
memcpy (src, orig_src, len);
|
||||
|
||||
char *res = CALL (impl, dst, src, len);
|
||||
if (res != dst)
|
||||
{
|
||||
error (0, 0, "Wrong result in function %s %p %p", impl->name,
|
||||
res, dst);
|
||||
ret = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
if (memcmp (dst, orig_src, len) != 0)
|
||||
{
|
||||
error (0, 0, "Wrong result in function %s dst \"%s\" src \"%s\"",
|
||||
impl->name, dst, src);
|
||||
ret = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
TIMING_NOW (start);
|
||||
for (i = 0; i < iters; ++i)
|
||||
{
|
||||
@@ -45,11 +65,11 @@ do_one_test (json_ctx_t *json_ctx, impl_t *impl, char *dst, char *src, const
|
||||
|
||||
TIMING_DIFF (cur, start, stop);
|
||||
|
||||
json_element_double (json_ctx, (double) cur / (double) iters);
|
||||
TIMING_PRINT_MEAN ((double) cur, (double) iters);
|
||||
}
|
||||
|
||||
static void
|
||||
do_test (json_ctx_t *json_ctx, size_t align1, size_t align2, size_t len)
|
||||
do_test (size_t align1, size_t align2, size_t len)
|
||||
{
|
||||
size_t i, j;
|
||||
char *s1, *s2;
|
||||
@@ -68,57 +88,35 @@ do_test (json_ctx_t *json_ctx, size_t align1, size_t align2, size_t len)
|
||||
for (i = 0, j = 1; i < len; i++, j += 23)
|
||||
s1[i] = j;
|
||||
|
||||
json_element_object_begin (json_ctx);
|
||||
json_attr_uint (json_ctx, "length", (double) len);
|
||||
json_attr_uint (json_ctx, "align1", (double) align1);
|
||||
json_attr_uint (json_ctx, "align2", (double) align2);
|
||||
json_array_begin (json_ctx, "timings");
|
||||
printf ("Length %4zd, alignment %2zd/%2zd:", len, align1, align2);
|
||||
|
||||
FOR_EACH_IMPL (impl, 0)
|
||||
do_one_test (json_ctx, impl, s2, (char *) (buf2 + align1), s1, len);
|
||||
do_one_test (impl, s2, (char *) (buf2 + align1), s1, len);
|
||||
|
||||
json_array_end (json_ctx);
|
||||
json_element_object_end (json_ctx);
|
||||
putchar ('\n');
|
||||
}
|
||||
|
||||
int
|
||||
test_main (void)
|
||||
{
|
||||
json_ctx_t json_ctx;
|
||||
size_t i;
|
||||
|
||||
test_init ();
|
||||
|
||||
json_init (&json_ctx, 0, stdout);
|
||||
|
||||
json_document_begin (&json_ctx);
|
||||
json_attr_string (&json_ctx, "timing_type", TIMING_TYPE);
|
||||
|
||||
json_attr_object_begin (&json_ctx, "functions");
|
||||
json_attr_object_begin (&json_ctx, "memmove");
|
||||
json_attr_string (&json_ctx, "bench-variant", "large");
|
||||
|
||||
json_array_begin (&json_ctx, "ifuncs");
|
||||
|
||||
printf ("%23s", "");
|
||||
FOR_EACH_IMPL (impl, 0)
|
||||
json_element_string (&json_ctx, impl->name);
|
||||
json_array_end (&json_ctx);
|
||||
printf ("\t%s", impl->name);
|
||||
putchar ('\n');
|
||||
|
||||
json_array_begin (&json_ctx, "results");
|
||||
for (i = START_SIZE; i <= MIN_PAGE_SIZE; i <<= 1)
|
||||
{
|
||||
do_test (&json_ctx, 0, 64, i + 7);
|
||||
do_test (&json_ctx, 0, 3, i + 15);
|
||||
do_test (&json_ctx, 3, 0, i + 31);
|
||||
do_test (&json_ctx, 3, 7, i + 63);
|
||||
do_test (&json_ctx, 9, 5, i + 127);
|
||||
do_test (0, 64, i + 7);
|
||||
do_test (0, 3, i + 15);
|
||||
do_test (3, 0, i + 31);
|
||||
do_test (3, 7, i + 63);
|
||||
do_test (9, 5, i + 127);
|
||||
}
|
||||
|
||||
json_array_end (&json_ctx);
|
||||
json_attr_object_end (&json_ctx);
|
||||
json_attr_object_end (&json_ctx);
|
||||
json_document_end (&json_ctx);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
+51
-49
@@ -23,7 +23,6 @@
|
||||
# define TEST_NAME "memmove"
|
||||
#endif
|
||||
#include "bench-string.h"
|
||||
#include "json-lib.h"
|
||||
|
||||
char *simple_memmove (char *, const char *, size_t);
|
||||
|
||||
@@ -65,12 +64,37 @@ simple_memmove (char *dst, const char *src, size_t n)
|
||||
}
|
||||
|
||||
static void
|
||||
do_one_test (json_ctx_t *json_ctx, impl_t *impl, char *dst, char *src, const
|
||||
char *orig_src, size_t len)
|
||||
do_one_test (impl_t *impl, char *dst, char *src, const char *orig_src,
|
||||
size_t len)
|
||||
{
|
||||
size_t i, iters = INNER_LOOP_ITERS;
|
||||
timing_t start, stop, cur;
|
||||
|
||||
/* This also clears the destination buffer set by the previous run. */
|
||||
memcpy (src, orig_src, len);
|
||||
#ifdef TEST_BCOPY
|
||||
CALL (impl, src, dst, len);
|
||||
#else
|
||||
char *res;
|
||||
|
||||
res = CALL (impl, dst, src, len);
|
||||
if (res != dst)
|
||||
{
|
||||
error (0, 0, "Wrong result in function %s %p %p", impl->name,
|
||||
res, dst);
|
||||
ret = 1;
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (memcmp (dst, orig_src, len) != 0)
|
||||
{
|
||||
error (0, 0, "Wrong result in function %s dst \"%s\" src \"%s\"",
|
||||
impl->name, dst, src);
|
||||
ret = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
TIMING_NOW (start);
|
||||
for (i = 0; i < iters; ++i)
|
||||
{
|
||||
@@ -84,11 +108,11 @@ do_one_test (json_ctx_t *json_ctx, impl_t *impl, char *dst, char *src, const
|
||||
|
||||
TIMING_DIFF (cur, start, stop);
|
||||
|
||||
json_element_double (json_ctx, (double) cur / (double) iters);
|
||||
TIMING_PRINT_MEAN ((double) cur, (double) iters);
|
||||
}
|
||||
|
||||
static void
|
||||
do_test (json_ctx_t *json_ctx, size_t align1, size_t align2, size_t len)
|
||||
do_test (size_t align1, size_t align2, size_t len)
|
||||
{
|
||||
size_t i, j;
|
||||
char *s1, *s2;
|
||||
@@ -107,82 +131,60 @@ do_test (json_ctx_t *json_ctx, size_t align1, size_t align2, size_t len)
|
||||
for (i = 0, j = 1; i < len; i++, j += 23)
|
||||
s1[i] = j;
|
||||
|
||||
json_element_object_begin (json_ctx);
|
||||
json_attr_uint (json_ctx, "length", (double) len);
|
||||
json_attr_uint (json_ctx, "align1", (double) align1);
|
||||
json_attr_uint (json_ctx, "align2", (double) align2);
|
||||
json_array_begin (json_ctx, "timings");
|
||||
printf ("Length %4zd, alignment %2zd/%2zd:", len, align1, align2);
|
||||
|
||||
FOR_EACH_IMPL (impl, 0)
|
||||
do_one_test (json_ctx, impl, s2, (char *) (buf2 + align1), s1, len);
|
||||
do_one_test (impl, s2, (char *) (buf2 + align1), s1, len);
|
||||
|
||||
json_array_end (json_ctx);
|
||||
json_element_object_end (json_ctx);
|
||||
putchar ('\n');
|
||||
}
|
||||
|
||||
static int
|
||||
test_main (void)
|
||||
{
|
||||
json_ctx_t json_ctx;
|
||||
size_t i;
|
||||
|
||||
test_init ();
|
||||
|
||||
json_init (&json_ctx, 0, stdout);
|
||||
|
||||
json_document_begin (&json_ctx);
|
||||
json_attr_string (&json_ctx, "timing_type", TIMING_TYPE);
|
||||
|
||||
json_attr_object_begin (&json_ctx, "functions");
|
||||
json_attr_object_begin (&json_ctx, "memmove");
|
||||
json_attr_string (&json_ctx, "bench-variant", "default");
|
||||
|
||||
json_array_begin (&json_ctx, "ifuncs");
|
||||
|
||||
printf ("%23s", "");
|
||||
FOR_EACH_IMPL (impl, 0)
|
||||
json_element_string (&json_ctx, impl->name);
|
||||
json_array_end (&json_ctx);
|
||||
printf ("\t%s", impl->name);
|
||||
putchar ('\n');
|
||||
|
||||
json_array_begin (&json_ctx, "results");
|
||||
for (i = 0; i < 14; ++i)
|
||||
{
|
||||
do_test (&json_ctx, 0, 32, 1 << i);
|
||||
do_test (&json_ctx, 32, 0, 1 << i);
|
||||
do_test (&json_ctx, 0, i, 1 << i);
|
||||
do_test (&json_ctx, i, 0, 1 << i);
|
||||
do_test (0, 32, 1 << i);
|
||||
do_test (32, 0, 1 << i);
|
||||
do_test (0, i, 1 << i);
|
||||
do_test (i, 0, 1 << i);
|
||||
}
|
||||
|
||||
for (i = 0; i < 32; ++i)
|
||||
{
|
||||
do_test (&json_ctx, 0, 32, i);
|
||||
do_test (&json_ctx, 32, 0, i);
|
||||
do_test (&json_ctx, 0, i, i);
|
||||
do_test (&json_ctx, i, 0, i);
|
||||
do_test (0, 32, i);
|
||||
do_test (32, 0, i);
|
||||
do_test (0, i, i);
|
||||
do_test (i, 0, i);
|
||||
}
|
||||
|
||||
for (i = 3; i < 32; ++i)
|
||||
{
|
||||
if ((i & (i - 1)) == 0)
|
||||
continue;
|
||||
do_test (&json_ctx, 0, 32, 16 * i);
|
||||
do_test (&json_ctx, 32, 0, 16 * i);
|
||||
do_test (&json_ctx, 0, i, 16 * i);
|
||||
do_test (&json_ctx, i, 0, 16 * i);
|
||||
do_test (0, 32, 16 * i);
|
||||
do_test (32, 0, 16 * i);
|
||||
do_test (0, i, 16 * i);
|
||||
do_test (i, 0, 16 * i);
|
||||
}
|
||||
|
||||
for (i = 32; i < 64; ++i)
|
||||
{
|
||||
do_test (&json_ctx, 0, 0, 32 * i);
|
||||
do_test (&json_ctx, i, 0, 32 * i);
|
||||
do_test (&json_ctx, 0, i, 32 * i);
|
||||
do_test (&json_ctx, i, i, 32 * i);
|
||||
do_test (0, 0, 32 * i);
|
||||
do_test (i, 0, 32 * i);
|
||||
do_test (0, i, 32 * i);
|
||||
do_test (i, i, 32 * i);
|
||||
}
|
||||
|
||||
json_array_end (&json_ctx);
|
||||
json_attr_object_end (&json_ctx);
|
||||
json_attr_object_end (&json_ctx);
|
||||
json_document_end (&json_ctx);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,6 @@
|
||||
#endif /* WIDE */
|
||||
|
||||
#include <assert.h>
|
||||
#include "json-lib.h"
|
||||
|
||||
IMPL (MEMSET, 1)
|
||||
|
||||
@@ -58,11 +57,27 @@ SIMPLE_MEMSET (CHAR *s, int c, size_t n)
|
||||
}
|
||||
|
||||
static void
|
||||
do_one_test (json_ctx_t *json_ctx, impl_t *impl, CHAR *s,
|
||||
int c __attribute ((unused)), size_t n)
|
||||
do_one_test (impl_t *impl, CHAR *s, int c __attribute ((unused)), size_t n)
|
||||
{
|
||||
size_t i, iters = 16;
|
||||
timing_t start, stop, cur;
|
||||
CHAR *tstbuf = malloc (n * sizeof (*s));
|
||||
assert (tstbuf != NULL);
|
||||
|
||||
/* Must clear the destination buffer updated by the previous run. */
|
||||
for (i = 0; i < n; i++)
|
||||
s[i] = 0;
|
||||
|
||||
CHAR *res = CALL (impl, s, c, n);
|
||||
if (res != s
|
||||
|| SIMPLE_MEMSET (tstbuf, c, n) != tstbuf
|
||||
|| MEMCMP (s, tstbuf, n) != 0)
|
||||
{
|
||||
error (0, 0, "Wrong result in function %s", impl->name);
|
||||
ret = 1;
|
||||
free (tstbuf);
|
||||
return;
|
||||
}
|
||||
|
||||
TIMING_NOW (start);
|
||||
for (i = 0; i < iters; ++i)
|
||||
@@ -73,69 +88,46 @@ do_one_test (json_ctx_t *json_ctx, impl_t *impl, CHAR *s,
|
||||
|
||||
TIMING_DIFF (cur, start, stop);
|
||||
|
||||
json_element_double (json_ctx, (double) cur / (double) iters);
|
||||
TIMING_PRINT_MEAN ((double) cur, (double) iters);
|
||||
|
||||
free (tstbuf);
|
||||
}
|
||||
|
||||
static void
|
||||
do_test (json_ctx_t *json_ctx, size_t align, int c, size_t len)
|
||||
do_test (size_t align, int c, size_t len)
|
||||
{
|
||||
align &= 63;
|
||||
if ((align + len) * sizeof (CHAR) > page_size)
|
||||
return;
|
||||
|
||||
json_element_object_begin (json_ctx);
|
||||
json_attr_uint (json_ctx, "length", len);
|
||||
json_attr_uint (json_ctx, "alignment", align);
|
||||
json_attr_int (json_ctx, "char", c);
|
||||
json_array_begin (json_ctx, "timings");
|
||||
printf ("Length %4zd, alignment %2zd, c %2d:", len, align, c);
|
||||
|
||||
FOR_EACH_IMPL (impl, 0)
|
||||
{
|
||||
do_one_test (json_ctx, impl, (CHAR *) (buf1) + align, c, len);
|
||||
realloc_bufs ();
|
||||
}
|
||||
do_one_test (impl, (CHAR *) (buf1) + align, c, len);
|
||||
|
||||
json_array_end (json_ctx);
|
||||
json_element_object_end (json_ctx);
|
||||
putchar ('\n');
|
||||
}
|
||||
|
||||
int
|
||||
test_main (void)
|
||||
{
|
||||
json_ctx_t json_ctx;
|
||||
size_t i;
|
||||
int c;
|
||||
|
||||
test_init ();
|
||||
|
||||
json_init (&json_ctx, 0, stdout);
|
||||
|
||||
json_document_begin (&json_ctx);
|
||||
json_attr_string (&json_ctx, "timing_type", TIMING_TYPE);
|
||||
|
||||
json_attr_object_begin (&json_ctx, "functions");
|
||||
json_attr_object_begin (&json_ctx, TEST_NAME);
|
||||
json_attr_string (&json_ctx, "bench-variant", "large");
|
||||
|
||||
json_array_begin (&json_ctx, "ifuncs");
|
||||
printf ("%24s", "");
|
||||
FOR_EACH_IMPL (impl, 0)
|
||||
json_element_string (&json_ctx, impl->name);
|
||||
json_array_end (&json_ctx);
|
||||
|
||||
json_array_begin (&json_ctx, "results");
|
||||
printf ("\t%s", impl->name);
|
||||
putchar ('\n');
|
||||
|
||||
c = 65;
|
||||
for (i = START_SIZE; i <= MIN_PAGE_SIZE; i <<= 1)
|
||||
{
|
||||
do_test (&json_ctx, 0, c, i);
|
||||
do_test (&json_ctx, 3, c, i);
|
||||
do_test (0, c, i);
|
||||
do_test (3, c, i);
|
||||
}
|
||||
|
||||
json_array_end (&json_ctx);
|
||||
json_attr_object_end (&json_ctx);
|
||||
json_attr_object_end (&json_ctx);
|
||||
json_document_end (&json_ctx);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
+36
-48
@@ -42,8 +42,6 @@
|
||||
# define MEMCMP wmemcmp
|
||||
#endif /* WIDE */
|
||||
|
||||
#include "json-lib.h"
|
||||
|
||||
CHAR *SIMPLE_MEMSET (CHAR *, int, size_t);
|
||||
|
||||
#ifdef TEST_BZERO
|
||||
@@ -96,11 +94,26 @@ SIMPLE_MEMSET (CHAR *s, int c, size_t n)
|
||||
}
|
||||
|
||||
static void
|
||||
do_one_test (json_ctx_t *json_ctx, impl_t *impl, CHAR *s,
|
||||
int c __attribute ((unused)), size_t n)
|
||||
do_one_test (impl_t *impl, CHAR *s, int c __attribute ((unused)), size_t n)
|
||||
{
|
||||
size_t i, iters = INNER_LOOP_ITERS;
|
||||
timing_t start, stop, cur;
|
||||
CHAR tstbuf[n];
|
||||
#ifdef TEST_BZERO
|
||||
simple_bzero (tstbuf, n);
|
||||
CALL (impl, s, n);
|
||||
if (memcmp (s, tstbuf, n) != 0)
|
||||
#else
|
||||
CHAR *res = CALL (impl, s, c, n);
|
||||
if (res != s
|
||||
|| SIMPLE_MEMSET (tstbuf, c, n) != tstbuf
|
||||
|| MEMCMP (s, tstbuf, n) != 0)
|
||||
#endif /* !TEST_BZERO */
|
||||
{
|
||||
error (0, 0, "Wrong result in function %s", impl->name);
|
||||
ret = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
TIMING_NOW (start);
|
||||
for (i = 0; i < iters; ++i)
|
||||
@@ -115,90 +128,65 @@ do_one_test (json_ctx_t *json_ctx, impl_t *impl, CHAR *s,
|
||||
|
||||
TIMING_DIFF (cur, start, stop);
|
||||
|
||||
json_element_double (json_ctx, (double) cur / (double) iters);
|
||||
TIMING_PRINT_MEAN ((double) cur, (double) iters);
|
||||
}
|
||||
|
||||
static void
|
||||
do_test (json_ctx_t *json_ctx, size_t align, int c, size_t len)
|
||||
do_test (size_t align, int c, size_t len)
|
||||
{
|
||||
align &= 63;
|
||||
if ((align + len) * sizeof (CHAR) > page_size)
|
||||
return;
|
||||
|
||||
json_element_object_begin (json_ctx);
|
||||
json_attr_uint (json_ctx, "length", len);
|
||||
json_attr_uint (json_ctx, "alignment", align);
|
||||
json_attr_int (json_ctx, "char", c);
|
||||
json_array_begin (json_ctx, "timings");
|
||||
printf ("Length %4zd, alignment %2zd, c %2d:", len, align, c);
|
||||
|
||||
FOR_EACH_IMPL (impl, 0)
|
||||
{
|
||||
do_one_test (json_ctx, impl, (CHAR *) (buf1) + align, c, len);
|
||||
realloc_bufs ();
|
||||
}
|
||||
do_one_test (impl, (CHAR *) (buf1) + align, c, len);
|
||||
|
||||
json_array_end (json_ctx);
|
||||
json_element_object_end (json_ctx);
|
||||
putchar ('\n');
|
||||
}
|
||||
|
||||
int
|
||||
test_main (void)
|
||||
{
|
||||
json_ctx_t json_ctx;
|
||||
size_t i;
|
||||
int c = 0;
|
||||
|
||||
test_init ();
|
||||
|
||||
json_init (&json_ctx, 0, stdout);
|
||||
|
||||
json_document_begin (&json_ctx);
|
||||
json_attr_string (&json_ctx, "timing_type", TIMING_TYPE);
|
||||
|
||||
json_attr_object_begin (&json_ctx, "functions");
|
||||
json_attr_object_begin (&json_ctx, TEST_NAME);
|
||||
json_attr_string (&json_ctx, "bench-variant", "");
|
||||
|
||||
json_array_begin (&json_ctx, "ifuncs");
|
||||
printf ("%24s", "");
|
||||
FOR_EACH_IMPL (impl, 0)
|
||||
json_element_string (&json_ctx, impl->name);
|
||||
json_array_end (&json_ctx);
|
||||
|
||||
json_array_begin (&json_ctx, "results");
|
||||
printf ("\t%s", impl->name);
|
||||
putchar ('\n');
|
||||
|
||||
#ifndef TEST_BZERO
|
||||
for (c = -65; c <= 130; c += 65)
|
||||
#endif
|
||||
{
|
||||
for (i = 0; i < 18; ++i)
|
||||
do_test (&json_ctx, 0, c, 1 << i);
|
||||
do_test (0, c, 1 << i);
|
||||
for (i = 1; i < 32; ++i)
|
||||
{
|
||||
do_test (&json_ctx, i, c, i);
|
||||
do_test (i, c, i);
|
||||
if (i & (i - 1))
|
||||
do_test (&json_ctx, 0, c, i);
|
||||
do_test (0, c, i);
|
||||
}
|
||||
for (i = 32; i < 512; i+=32)
|
||||
{
|
||||
do_test (&json_ctx, 0, c, i);
|
||||
do_test (&json_ctx, i, c, i);
|
||||
do_test (0, c, i);
|
||||
do_test (i, c, i);
|
||||
}
|
||||
do_test (&json_ctx, 1, c, 14);
|
||||
do_test (&json_ctx, 3, c, 1024);
|
||||
do_test (&json_ctx, 4, c, 64);
|
||||
do_test (&json_ctx, 2, c, 25);
|
||||
do_test (1, c, 14);
|
||||
do_test (3, c, 1024);
|
||||
do_test (4, c, 64);
|
||||
do_test (2, c, 25);
|
||||
}
|
||||
for (i = 33; i <= 256; i += 4)
|
||||
{
|
||||
do_test (&json_ctx, 0, c, 32 * i);
|
||||
do_test (&json_ctx, i, c, 32 * i);
|
||||
do_test (0, c, 32 * i);
|
||||
do_test (i, c, 32 * i);
|
||||
}
|
||||
|
||||
json_array_end (&json_ctx);
|
||||
json_attr_object_end (&json_ctx);
|
||||
json_attr_object_end (&json_ctx);
|
||||
json_document_end (&json_ctx);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
+21
-61
@@ -68,61 +68,34 @@ main (int argc, char **argv)
|
||||
clock_gettime (CLOCK_MONOTONIC_RAW, &runtime);
|
||||
runtime.tv_sec += DURATION;
|
||||
|
||||
bool is_bench = strncmp (VARIANT (v), "workload-", 9) == 0;
|
||||
double d_total_i = 0;
|
||||
timing_t total = 0, max = 0, min = 0x7fffffffffffffff;
|
||||
timing_t throughput = 0, latency = 0;
|
||||
int64_t c = 0;
|
||||
uint64_t cur;
|
||||
BENCH_VARS;
|
||||
while (1)
|
||||
{
|
||||
if (is_bench)
|
||||
for (i = 0; i < NUM_SAMPLES (v); i++)
|
||||
{
|
||||
/* Benchmark a real trace of calls - all samples are iterated
|
||||
over once before repeating. This models actual use more
|
||||
accurately than repeating the same sample many times. */
|
||||
uint64_t cur;
|
||||
TIMING_NOW (start);
|
||||
for (k = 0; k < iters; k++)
|
||||
for (i = 0; i < NUM_SAMPLES (v); i++)
|
||||
BENCH_FUNC (v, i);
|
||||
BENCH_FUNC (v, i);
|
||||
TIMING_NOW (end);
|
||||
TIMING_DIFF (cur, start, end);
|
||||
TIMING_ACCUM (throughput, cur);
|
||||
|
||||
TIMING_NOW (start);
|
||||
for (k = 0; k < iters; k++)
|
||||
for (i = 0; i < NUM_SAMPLES (v); i++)
|
||||
BENCH_FUNC_LAT (v, i);
|
||||
TIMING_NOW (end);
|
||||
TIMING_DIFF (cur, start, end);
|
||||
TIMING_ACCUM (latency, cur);
|
||||
|
||||
d_total_i += iters * NUM_SAMPLES (v);
|
||||
if (cur > max)
|
||||
max = cur;
|
||||
|
||||
if (cur < min)
|
||||
min = cur;
|
||||
|
||||
TIMING_ACCUM (total, cur);
|
||||
/* Accumulate timings for the value. In the end we will divide
|
||||
by the total iterations. */
|
||||
RESULT_ACCUM (cur, v, i, c * iters, (c + 1) * iters);
|
||||
|
||||
d_total_i += iters;
|
||||
}
|
||||
else
|
||||
for (i = 0; i < NUM_SAMPLES (v); i++)
|
||||
{
|
||||
TIMING_NOW (start);
|
||||
for (k = 0; k < iters; k++)
|
||||
BENCH_FUNC (v, i);
|
||||
TIMING_NOW (end);
|
||||
|
||||
TIMING_DIFF (cur, start, end);
|
||||
|
||||
if (cur > max)
|
||||
max = cur;
|
||||
|
||||
if (cur < min)
|
||||
min = cur;
|
||||
|
||||
TIMING_ACCUM (total, cur);
|
||||
/* Accumulate timings for the value. In the end we will divide
|
||||
by the total iterations. */
|
||||
RESULT_ACCUM (cur, v, i, c * iters, (c + 1) * iters);
|
||||
|
||||
d_total_i += iters;
|
||||
}
|
||||
c++;
|
||||
struct timespec curtime;
|
||||
|
||||
@@ -142,26 +115,13 @@ main (int argc, char **argv)
|
||||
/* Begin variant. */
|
||||
json_attr_object_begin (&json_ctx, VARIANT (v));
|
||||
|
||||
if (is_bench)
|
||||
{
|
||||
json_attr_double (&json_ctx, "reciprocal-throughput",
|
||||
throughput / d_total_i);
|
||||
json_attr_double (&json_ctx, "latency", latency / d_total_i);
|
||||
json_attr_double (&json_ctx, "max-throughput",
|
||||
d_total_i / throughput * 1000000000.0);
|
||||
json_attr_double (&json_ctx, "min-throughput",
|
||||
d_total_i / latency * 1000000000.0);
|
||||
}
|
||||
else
|
||||
{
|
||||
json_attr_double (&json_ctx, "duration", d_total_s);
|
||||
json_attr_double (&json_ctx, "iterations", d_total_i);
|
||||
json_attr_double (&json_ctx, "max", max / d_iters);
|
||||
json_attr_double (&json_ctx, "min", min / d_iters);
|
||||
json_attr_double (&json_ctx, "mean", d_total_s / d_total_i);
|
||||
}
|
||||
json_attr_double (&json_ctx, "duration", d_total_s);
|
||||
json_attr_double (&json_ctx, "iterations", d_total_i);
|
||||
json_attr_double (&json_ctx, "max", max / d_iters);
|
||||
json_attr_double (&json_ctx, "min", min / d_iters);
|
||||
json_attr_double (&json_ctx, "mean", d_total_s / d_total_i);
|
||||
|
||||
if (detailed && !is_bench)
|
||||
if (detailed)
|
||||
{
|
||||
json_array_begin (&json_ctx, "timings");
|
||||
|
||||
|
||||
+20
-45
@@ -172,49 +172,6 @@ static impl_t *impl_array;
|
||||
# define BUF1PAGES 1
|
||||
# endif
|
||||
|
||||
static void
|
||||
alloc_bufs (void)
|
||||
{
|
||||
page_size = 2 * getpagesize ();
|
||||
# ifdef MIN_PAGE_SIZE
|
||||
if (page_size < MIN_PAGE_SIZE)
|
||||
page_size = MIN_PAGE_SIZE;
|
||||
# endif
|
||||
buf1 = mmap (0, (BUF1PAGES + 1) * page_size, PROT_READ | PROT_WRITE,
|
||||
MAP_PRIVATE | MAP_ANON, -1, 0);
|
||||
if (buf1 == MAP_FAILED)
|
||||
error (EXIT_FAILURE, errno, "mmap failed for buf1");
|
||||
if (mprotect (buf1 + BUF1PAGES * page_size, page_size, PROT_NONE))
|
||||
error (EXIT_FAILURE, errno, "mprotect failed for buf1");
|
||||
buf2 = mmap (0, 2 * page_size, PROT_READ | PROT_WRITE,
|
||||
MAP_PRIVATE | MAP_ANON, -1, 0);
|
||||
if (buf2 == MAP_FAILED)
|
||||
error (EXIT_FAILURE, errno, "mmap failed for buf2");
|
||||
if (mprotect (buf2 + page_size, page_size, PROT_NONE))
|
||||
error (EXIT_FAILURE, errno, "mprotect failed for buf2");
|
||||
}
|
||||
|
||||
static void
|
||||
__attribute__ ((unused))
|
||||
realloc_bufs (void)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
if (buf1)
|
||||
ret = munmap (buf1, (BUF1PAGES + 1) * page_size);
|
||||
|
||||
if (ret != 0)
|
||||
error (EXIT_FAILURE, errno, "munmap failed for buf1");
|
||||
|
||||
if (buf2)
|
||||
ret = munmap (buf2, 2 * page_size);
|
||||
|
||||
if (ret != 0)
|
||||
error (EXIT_FAILURE, errno, "munmap failed for buf2");
|
||||
|
||||
alloc_bufs ();
|
||||
}
|
||||
|
||||
static void
|
||||
test_init (void)
|
||||
{
|
||||
@@ -224,13 +181,31 @@ test_init (void)
|
||||
/ sizeof func_list[0]));
|
||||
# endif
|
||||
|
||||
alloc_bufs ();
|
||||
|
||||
page_size = 2 * getpagesize ();
|
||||
# ifdef MIN_PAGE_SIZE
|
||||
if (page_size < MIN_PAGE_SIZE)
|
||||
page_size = MIN_PAGE_SIZE;
|
||||
# endif
|
||||
buf1 = mmap (0, (BUF1PAGES + 1) * page_size, PROT_READ | PROT_WRITE,
|
||||
MAP_PRIVATE | MAP_ANON, -1, 0);
|
||||
if (buf1 == MAP_FAILED)
|
||||
error (EXIT_FAILURE, errno, "mmap failed");
|
||||
if (mprotect (buf1 + BUF1PAGES * page_size, page_size, PROT_NONE))
|
||||
error (EXIT_FAILURE, errno, "mprotect failed");
|
||||
buf2 = mmap (0, 2 * page_size, PROT_READ | PROT_WRITE,
|
||||
MAP_PRIVATE | MAP_ANON, -1, 0);
|
||||
if (buf2 == MAP_FAILED)
|
||||
error (EXIT_FAILURE, errno, "mmap failed");
|
||||
if (mprotect (buf2 + page_size, page_size, PROT_NONE))
|
||||
error (EXIT_FAILURE, errno, "mprotect failed");
|
||||
if (do_srandom)
|
||||
{
|
||||
printf ("Setting seed to 0x%x\n", seed);
|
||||
srandom (seed);
|
||||
}
|
||||
|
||||
memset (buf1, 0xa5, BUF1PAGES * page_size);
|
||||
memset (buf2, 0x5a, page_size);
|
||||
}
|
||||
|
||||
#endif /* TEST_MAIN */
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -100,32 +100,6 @@ json_attr_string (json_ctx_t *ctx, const char *name, const char *s)
|
||||
fprintf (ctx->fp, "\"%s\": \"%s\"", name, s);
|
||||
}
|
||||
|
||||
void
|
||||
json_attr_uint (json_ctx_t *ctx, const char *name, uint64_t d)
|
||||
{
|
||||
if (!ctx->first_element)
|
||||
fprintf (ctx->fp, ",\n");
|
||||
else
|
||||
ctx->first_element = false;
|
||||
|
||||
do_indent (ctx);
|
||||
|
||||
fprintf (ctx->fp, "\"%s\": %" PRIu64 , name, d);
|
||||
}
|
||||
|
||||
void
|
||||
json_attr_int (json_ctx_t *ctx, const char *name, int64_t d)
|
||||
{
|
||||
if (!ctx->first_element)
|
||||
fprintf (ctx->fp, ",\n");
|
||||
else
|
||||
ctx->first_element = false;
|
||||
|
||||
do_indent (ctx);
|
||||
|
||||
fprintf (ctx->fp, "\"%s\": %" PRId64 , name, d);
|
||||
}
|
||||
|
||||
void
|
||||
json_attr_double (json_ctx_t *ctx, const char *name, double d)
|
||||
{
|
||||
@@ -162,42 +136,6 @@ json_array_end (json_ctx_t *ctx)
|
||||
fputs ("]", ctx->fp);
|
||||
}
|
||||
|
||||
void
|
||||
json_element_string (json_ctx_t *ctx, const char *s)
|
||||
{
|
||||
if (!ctx->first_element)
|
||||
fprintf (ctx->fp, ", \"%s\"", s);
|
||||
else
|
||||
{
|
||||
fprintf (ctx->fp, "\"%s\"", s);
|
||||
ctx->first_element = false;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
json_element_uint (json_ctx_t *ctx, uint64_t d)
|
||||
{
|
||||
if (!ctx->first_element)
|
||||
fprintf (ctx->fp, ", %" PRIu64, d);
|
||||
else
|
||||
{
|
||||
fprintf (ctx->fp, "%" PRIu64, d);
|
||||
ctx->first_element = false;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
json_element_int (json_ctx_t *ctx, int64_t d)
|
||||
{
|
||||
if (!ctx->first_element)
|
||||
fprintf (ctx->fp, ", %" PRId64, d);
|
||||
else
|
||||
{
|
||||
fprintf (ctx->fp, "%" PRId64, d);
|
||||
ctx->first_element = false;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
json_element_double (json_ctx_t *ctx, double d)
|
||||
{
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
#define __JSON_LIB_H__
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <inttypes.h>
|
||||
#include <stdio.h>
|
||||
|
||||
struct json_ctx
|
||||
@@ -38,14 +37,9 @@ void json_document_end (json_ctx_t *ctx);
|
||||
void json_attr_object_begin (json_ctx_t *ctx, const char *name);
|
||||
void json_attr_object_end (json_ctx_t *ctx);
|
||||
void json_attr_string (json_ctx_t *ctx, const char *name, const char *s);
|
||||
void json_attr_int (json_ctx_t *ctx, const char *name, int64_t d);
|
||||
void json_attr_uint (json_ctx_t *ctx, const char *name, uint64_t d);
|
||||
void json_attr_double (json_ctx_t *ctx, const char *name, double d);
|
||||
void json_array_begin (json_ctx_t *ctx, const char *name);
|
||||
void json_array_end (json_ctx_t *ctx);
|
||||
void json_element_string (json_ctx_t *ctx, const char *s);
|
||||
void json_element_int (json_ctx_t *ctx, int64_t d);
|
||||
void json_element_uint (json_ctx_t *ctx, uint64_t d);
|
||||
void json_element_double (json_ctx_t *ctx, double d);
|
||||
void json_element_object_begin (json_ctx_t *ctx);
|
||||
void json_element_object_end (json_ctx_t *ctx);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -45,7 +45,7 @@ DEFINES_TEMPLATE = '''
|
||||
# variant is represented by the _VARIANT structure. The ARGS structure
|
||||
# represents a single set of arguments.
|
||||
STRUCT_TEMPLATE = '''
|
||||
#define CALL_BENCH_FUNC(v, i, x) %(func)s (x %(func_args)s)
|
||||
#define CALL_BENCH_FUNC(v, i) %(func)s (%(func_args)s)
|
||||
|
||||
struct args
|
||||
{
|
||||
@@ -84,9 +84,7 @@ EPILOGUE = '''
|
||||
#define RESULT(__v, __i) (variants[(__v)].in[(__i)].timing)
|
||||
#define RESULT_ACCUM(r, v, i, old, new) \\
|
||||
((RESULT ((v), (i))) = (RESULT ((v), (i)) * (old) + (r)) / ((new) + 1))
|
||||
#define BENCH_FUNC(i, j) ({%(getret)s CALL_BENCH_FUNC (i, j, );})
|
||||
#define BENCH_FUNC_LAT(i, j) ({%(getret)s CALL_BENCH_FUNC (i, j, %(latarg)s);})
|
||||
#define BENCH_VARS %(defvar)s
|
||||
#define BENCH_FUNC(i, j) ({%(getret)s CALL_BENCH_FUNC (i, j);})
|
||||
#define FUNCNAME "%(func)s"
|
||||
#include "bench-skeleton.c"'''
|
||||
|
||||
@@ -124,23 +122,17 @@ def gen_source(func, directives, all_vals):
|
||||
# If we have a return value from the function, make sure it is
|
||||
# assigned to prevent the compiler from optimizing out the
|
||||
# call.
|
||||
getret = ''
|
||||
latarg = ''
|
||||
defvar = ''
|
||||
|
||||
if directives['ret']:
|
||||
print('static %s volatile ret;' % directives['ret'])
|
||||
print('static %s zero __attribute__((used)) = 0;' % directives['ret'])
|
||||
getret = 'ret = func_res = '
|
||||
# Note this may not work if argument and result type are incompatible.
|
||||
latarg = 'func_res * zero +'
|
||||
defvar = '%s func_res = 0;' % directives['ret']
|
||||
getret = 'ret = '
|
||||
else:
|
||||
getret = ''
|
||||
|
||||
# Test initialization.
|
||||
if directives['init']:
|
||||
print('#define BENCH_INIT %s' % directives['init'])
|
||||
|
||||
print(EPILOGUE % {'getret': getret, 'func': func, 'latarg': latarg, 'defvar': defvar })
|
||||
print(EPILOGUE % {'getret': getret, 'func': func})
|
||||
|
||||
|
||||
def _print_arg_data(func, directives, all_vals):
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
{
|
||||
"title": "string benchmark",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"timing_type": {
|
||||
"type": "string"
|
||||
},
|
||||
"functions": {
|
||||
"title": "Associative array of functions",
|
||||
"type": "object",
|
||||
"patternProperties": {
|
||||
"^[_a-zA-Z][_a-zA-Z0-9]+$": {
|
||||
"title": "Function names",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"bench-variant": {"type": "string"},
|
||||
"ifuncs": {
|
||||
"type": "array",
|
||||
"items": {"type": "string"}
|
||||
},
|
||||
"results": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"timings": {
|
||||
"type": "array",
|
||||
"items": {"type": "number"}
|
||||
}
|
||||
},
|
||||
"additionalProperties": {"type": "number"},
|
||||
"minProperties": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"minProperties": 1
|
||||
}
|
||||
},
|
||||
"required": ["timing_type", "functions"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
@@ -1,157 +0,0 @@
|
||||
#!/usr/bin/python
|
||||
# Copyright (C) 2017 Free Software Foundation, Inc.
|
||||
# This file is part of the GNU C Library.
|
||||
#
|
||||
# The GNU C Library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
#
|
||||
# The GNU C Library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with the GNU C Library; if not, see
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
"""Compare results of string functions
|
||||
|
||||
Given a string benchmark result file, print a table with comparisons with a
|
||||
baseline. The baseline is the first function, which typically is the builtin
|
||||
function.
|
||||
"""
|
||||
import matplotlib as mpl
|
||||
mpl.use('Agg')
|
||||
|
||||
import sys
|
||||
import os
|
||||
import json
|
||||
import pylab
|
||||
import argparse
|
||||
|
||||
try:
|
||||
import jsonschema as validator
|
||||
except ImportError:
|
||||
print('Could not find jsonschema module.')
|
||||
raise
|
||||
|
||||
|
||||
def parse_file(filename, schema_filename):
|
||||
with open(schema_filename, 'r') as schemafile:
|
||||
schema = json.load(schemafile)
|
||||
with open(filename, 'r') as benchfile:
|
||||
bench = json.load(benchfile)
|
||||
validator.validate(bench, schema)
|
||||
return bench
|
||||
|
||||
|
||||
def draw_graph(f, v, ifuncs, results):
|
||||
"""Plot graphs for functions
|
||||
|
||||
Plot line graphs for each of the ifuncs
|
||||
|
||||
Args:
|
||||
f: Function name
|
||||
v: Benchmark variant for the function.
|
||||
ifuncs: List of ifunc names
|
||||
results: Dictionary of results for each test criterion
|
||||
"""
|
||||
print('Generating graph for %s, variant \'%s\'' % (f, v))
|
||||
xkeys = results.keys()
|
||||
|
||||
pylab.clf()
|
||||
fig = pylab.figure(frameon=False)
|
||||
fig.set_size_inches(32, 18)
|
||||
pylab.ylabel('Performance improvement from base')
|
||||
X = range(len(xkeys))
|
||||
pylab.xticks(X, xkeys)
|
||||
|
||||
i = 0
|
||||
|
||||
while i < len(ifuncs):
|
||||
Y = [results[k][i] for k in xkeys]
|
||||
lines = pylab.plot(X, Y, label=':'+ifuncs[i])
|
||||
i = i + 1
|
||||
|
||||
pylab.legend()
|
||||
pylab.grid()
|
||||
pylab.savefig('%s-%s.png' % (f, v), bbox_inches='tight')
|
||||
|
||||
|
||||
def process_results(results, attrs, base_func, graph):
|
||||
""" Process results and print them
|
||||
|
||||
Args:
|
||||
results: JSON dictionary of results
|
||||
attrs: Attributes that form the test criteria
|
||||
"""
|
||||
|
||||
for f in results['functions'].keys():
|
||||
print('Function: %s' % f)
|
||||
v = results['functions'][f]['bench-variant']
|
||||
print('Variant: %s' % v)
|
||||
|
||||
base_index = 0
|
||||
if base_func:
|
||||
base_index = results['functions'][f]['ifuncs'].index(base_func)
|
||||
|
||||
print("%36s%s" % (' ', '\t'.join(results['functions'][f]['ifuncs'])))
|
||||
print("=" * 120)
|
||||
graph_res = {}
|
||||
for res in results['functions'][f]['results']:
|
||||
attr_list = ['%s=%s' % (a, res[a]) for a in attrs]
|
||||
i = 0
|
||||
key = ', '.join(attr_list)
|
||||
sys.stdout.write('%36s: ' % key)
|
||||
graph_res[key] = res['timings']
|
||||
for t in res['timings']:
|
||||
sys.stdout.write ('%12.2f' % t)
|
||||
if i != base_index:
|
||||
base = res['timings'][base_index]
|
||||
diff = (base - t) * 100 / base
|
||||
sys.stdout.write (' (%6.2f%%)' % diff)
|
||||
sys.stdout.write('\t')
|
||||
i = i + 1
|
||||
print('')
|
||||
|
||||
if graph:
|
||||
draw_graph(f, v, results['functions'][f]['ifuncs'], graph_res)
|
||||
|
||||
|
||||
def main(args):
|
||||
"""Program Entry Point
|
||||
|
||||
Take a string benchmark output file and compare timings.
|
||||
"""
|
||||
|
||||
base_func = None
|
||||
filename = args.input
|
||||
schema_filename = args.schema
|
||||
base_func = args.base
|
||||
attrs = args.attributes.split(',')
|
||||
|
||||
results = parse_file(args.input, args.schema)
|
||||
process_results(results, attrs, base_func, args.graph)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
parser = argparse.ArgumentParser()
|
||||
|
||||
# The required arguments.
|
||||
req = parser.add_argument_group(title='required arguments')
|
||||
req.add_argument('-a', '--attributes', required=True,
|
||||
help='Comma separated list of benchmark attributes.')
|
||||
req.add_argument('-i', '--input', required=True,
|
||||
help='Input JSON benchmark result file.')
|
||||
req.add_argument('-s', '--schema', required=True,
|
||||
help='Schema file to validate the result file.')
|
||||
|
||||
# Optional arguments.
|
||||
parser.add_argument('-b', '--base',
|
||||
help='IFUNC variant to set as baseline.')
|
||||
parser.add_argument('-g', '--graph', action='store_true',
|
||||
help='Generate a graph from results.')
|
||||
|
||||
args = parser.parse_args()
|
||||
main(args)
|
||||
@@ -9667,6 +9667,7 @@ hr.po
|
||||
libc.pot
|
||||
ko.po
|
||||
ru.po
|
||||
extra-modules.mk
|
||||
intl
|
||||
tst-gettext4-fr.po
|
||||
tstcodeset.po
|
||||
@@ -11232,7 +11233,6 @@ ISO-8859-9E
|
||||
UTF-8
|
||||
ISO-8859-2
|
||||
IBM850
|
||||
IBM858
|
||||
EUC-TW
|
||||
KOI8-U
|
||||
IBM903
|
||||
@@ -13252,6 +13252,7 @@ sigset.h
|
||||
atomic.h
|
||||
utmp.h
|
||||
stdlib-bsearch.h
|
||||
cppflags-iterator.mk
|
||||
iconvdata
|
||||
MISSING
|
||||
ibm1164.h
|
||||
@@ -13921,7 +13922,6 @@ ibm12712.c
|
||||
ibm1145.h
|
||||
ibm932.c
|
||||
ibm850.c
|
||||
ibm858.c
|
||||
ibm437.c
|
||||
ibm1399.c
|
||||
stdio-common
|
||||
@@ -15245,4 +15245,3 @@ w_exp2l.c
|
||||
bug-nexttoward.c
|
||||
w_dreml.c
|
||||
s_nanf.c
|
||||
libof-iterator.mk
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
## args: int:size_t:size_t
|
||||
## init: thread_create_init
|
||||
## includes: pthread.h
|
||||
## include-sources: thread_create-source.c
|
||||
|
||||
## name: stack=1024,guard=1
|
||||
32, 1024, 1
|
||||
## name: stack=1024,guard=2
|
||||
32, 1024, 2
|
||||
|
||||
## name: stack=2048,guard=1
|
||||
32, 2048, 1
|
||||
## name: stack=2048,guard=2
|
||||
32, 2048, 2
|
||||
@@ -1,58 +0,0 @@
|
||||
/* Measure pthread_create thread creation with different stack
|
||||
and guard sizes.
|
||||
|
||||
Copyright (C) 2017 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <support/xthread.h>
|
||||
|
||||
static size_t pgsize;
|
||||
|
||||
static void
|
||||
thread_create_init (void)
|
||||
{
|
||||
pgsize = sysconf (_SC_PAGESIZE);
|
||||
}
|
||||
|
||||
static void *
|
||||
thread_dummy (void *arg)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
thread_create (int nthreads, size_t stacksize, size_t guardsize)
|
||||
{
|
||||
pthread_attr_t attr;
|
||||
xpthread_attr_init (&attr);
|
||||
|
||||
stacksize = stacksize * pgsize;
|
||||
guardsize = guardsize * pgsize;
|
||||
|
||||
xpthread_attr_setstacksize (&attr, stacksize);
|
||||
xpthread_attr_setguardsize (&attr, guardsize);
|
||||
|
||||
pthread_t ts[nthreads];
|
||||
|
||||
for (int i = 0; i < nthreads; i++)
|
||||
ts[i] = xpthread_create (&attr, thread_dummy, NULL);
|
||||
|
||||
for (int i = 0; i < nthreads; i++)
|
||||
xpthread_join (ts[i]);
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
## args: double
|
||||
## ret: double
|
||||
## includes: math.h
|
||||
0.0
|
||||
-0.0
|
||||
0.001
|
||||
-0.001
|
||||
0.5
|
||||
-0.5
|
||||
0.999
|
||||
-0.999
|
||||
1.0
|
||||
-1.0
|
||||
1.001
|
||||
-1.001
|
||||
123.5
|
||||
-123.5
|
||||
12345.1
|
||||
-1000000.1
|
||||
1e15
|
||||
-1e30
|
||||
1e200
|
||||
@@ -1,21 +0,0 @@
|
||||
## args: float
|
||||
## ret: float
|
||||
## includes: math.h
|
||||
0.0f
|
||||
-0.0f
|
||||
0.001f
|
||||
-0.001f
|
||||
0.5f
|
||||
-0.5f
|
||||
0.999f
|
||||
-0.999f
|
||||
1.0f
|
||||
-1.0f
|
||||
1.001f
|
||||
-1.001f
|
||||
123.5f
|
||||
-123.5f
|
||||
12345.1f
|
||||
-1000000.5f
|
||||
1e15f
|
||||
-1e30f
|
||||
+14
-30
@@ -1,5 +1,4 @@
|
||||
/* Error constants. Generic version.
|
||||
Copyright (C) 1991-2017 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991-2017 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -16,35 +15,20 @@
|
||||
License along with the GNU C Library; if not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
/* This file defines the errno constants. */
|
||||
/* This file defines the `errno' constants. */
|
||||
|
||||
#ifndef _BITS_ERRNO_H
|
||||
#define _BITS_ERRNO_H 1
|
||||
#if !defined __Emath_defined && (defined _ERRNO_H || defined __need_Emath)
|
||||
#undef __need_Emath
|
||||
#define __Emath_defined 1
|
||||
|
||||
#if !defined _ERRNO_H
|
||||
# error "Never include <bits/errno.h> directly; use <errno.h> instead."
|
||||
# define EDOM XXX <--- fill in what is actually needed
|
||||
# define EILSEQ XXX <--- fill in what is actually needed
|
||||
# define ERANGE XXX <--- fill in what is actually needed
|
||||
#endif
|
||||
|
||||
#error "Generic bits/errno.h included -- port is incomplete."
|
||||
|
||||
/* Authors of new ports of the GNU C Library must override this file
|
||||
with their own bits/errno.h in an appropriate subdirectory of
|
||||
sysdeps/. Its function is to define all of the error constants
|
||||
from C2011 and POSIX.1-2008, with values appropriate to the
|
||||
operating system, and any additional OS-specific error constants.
|
||||
|
||||
C2011 requires all error constants to be object-like macros that
|
||||
expand to "integer constant expressions with type int, positive
|
||||
values, and suitable for use in #if directives". Moreover, all of
|
||||
their names must begin with a capital E, followed immediately by
|
||||
either another capital letter, or a digit. It is OK to define
|
||||
macros that are not error constants, but only in the implementation
|
||||
namespace.
|
||||
|
||||
errno.h is sometimes included from assembly language. Therefore,
|
||||
when __ASSEMBLER__ is defined, bits/errno.h may only define macros;
|
||||
it may not make any other kind of C declaration or definition.
|
||||
Also, the error constants should, if at all possible, expand to
|
||||
simple decimal or hexadecimal numbers. */
|
||||
|
||||
#endif /* bits/errno.h. */
|
||||
#ifdef _ERRNO_H
|
||||
# error "Define here all the missing error messages for the port. These"
|
||||
# error "must match the numbers of the kernel."
|
||||
# define Exxxx XXX
|
||||
...
|
||||
#endif
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
/* Macros to control TS 18661-3 glibc features.
|
||||
Copyright (C) 2017 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Defined to 1 if the current compiler invocation provides a
|
||||
floating-point type with the IEEE 754 binary128 format, and this glibc
|
||||
includes corresponding *f128 interfaces for it. */
|
||||
#define __HAVE_FLOAT128 0
|
||||
|
||||
/* Defined to 1 if __HAVE_FLOAT128 is 1 and the type is ABI-distinct
|
||||
from the default float, double and long double types in this glibc. */
|
||||
#define __HAVE_DISTINCT_FLOAT128 0
|
||||
|
||||
/* Defined to concatenate the literal suffix to be used with _Float128
|
||||
types, if __HAVE_FLOAT128 is 1.
|
||||
E.g.: #define __f128(x) x##f128. */
|
||||
#undef __f128
|
||||
|
||||
/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1.
|
||||
E.g.: #define __CFLOAT128 _Complex _Float128. */
|
||||
#undef __CFLOAT128
|
||||
@@ -1,5 +1,6 @@
|
||||
/* Implementation limits related to sys/uio.h - generic version.
|
||||
Copyright (C) 2017 Free Software Foundation, Inc.
|
||||
/* Stub `HUGE_VAL' constant.
|
||||
Used by <stdlib.h> and <math.h> functions for overflow.
|
||||
Copyright (C) 1992-2017 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -16,11 +17,12 @@
|
||||
License along with the GNU C Library; if not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _BITS_UIO_LIM_H
|
||||
#define _BITS_UIO_LIM_H 1
|
||||
#ifndef _MATH_H
|
||||
# error "Never use <bits/huge_val.h> directly; include <math.h> instead."
|
||||
#endif
|
||||
|
||||
/* Maximum length of the 'struct iovec' array in a single call to
|
||||
readv or writev. If there is no limit, the macro is not defined. */
|
||||
#undef __IOV_MAX
|
||||
|
||||
#if __GNUC_PREREQ(3,3)
|
||||
# define HUGE_VAL (__builtin_huge_val())
|
||||
#else
|
||||
# define HUGE_VAL 1e37
|
||||
#endif
|
||||
@@ -1,5 +1,6 @@
|
||||
/* Frees the dynamically allocated storage from an earlier call to glob.
|
||||
Copyright (C) 2017 Free Software Foundation, Inc.
|
||||
/* Stub `HUGE_VALF' constant.
|
||||
Used by <stdlib.h> and <math.h> functions for overflow.
|
||||
Copyright (C) 1992-2017 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -16,16 +17,12 @@
|
||||
License along with the GNU C Library; if not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _LIBC
|
||||
# include <config.h>
|
||||
#ifndef _MATH_H
|
||||
# error "Never use <bits/huge_valf.h> directly; include <math.h> instead."
|
||||
#endif
|
||||
|
||||
#include <glob.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
/* Free storage allocated in PGLOB by a previous `glob' call. */
|
||||
void
|
||||
globfree64 (glob64_t *pglob)
|
||||
{
|
||||
}
|
||||
libc_hidden_def (globfree64)
|
||||
#if __GNUC_PREREQ(3,3)
|
||||
# define HUGE_VALF (__builtin_huge_valf())
|
||||
#else
|
||||
# define HUGE_VALF 1e37f
|
||||
#endif
|
||||
@@ -1,5 +1,6 @@
|
||||
/* Operating system-specific extensions to sys/uio.h - generic version.
|
||||
Copyright (C) 2017 Free Software Foundation, Inc.
|
||||
/* Default `HUGE_VALL' constant.
|
||||
Used by <stdlib.h> and <math.h> functions for overflow.
|
||||
Copyright (C) 1992-2017 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -16,13 +17,12 @@
|
||||
License along with the GNU C Library; if not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _BITS_UIO_EXT_H
|
||||
#define _BITS_UIO_EXT_H 1
|
||||
|
||||
#ifndef _SYS_UIO_H
|
||||
# error "Never include <bits/uio-ext.h> directly; use <sys/uio.h> instead."
|
||||
#ifndef _MATH_H
|
||||
# error "Never use <bits/huge_vall.h> directly; include <math.h> instead."
|
||||
#endif
|
||||
|
||||
/* This operating system does not extend sys/uio.h. */
|
||||
|
||||
#endif /* sys/uio_ext.h */
|
||||
#if __GNUC_PREREQ(3,3)
|
||||
# define HUGE_VALL (__builtin_huge_vall())
|
||||
#else
|
||||
# define HUGE_VALL ((long double) HUGE_VAL)
|
||||
#endif
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Checking wmemset for x86-64.
|
||||
/* Default `INFINITY' constant.
|
||||
Copyright (C) 2004-2017 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
@@ -16,18 +16,17 @@
|
||||
License along with the GNU C Library; if not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <sysdep.h>
|
||||
#include "asm-syntax.h"
|
||||
#ifndef _MATH_H
|
||||
# error "Never use <bits/inf.h> directly; include <math.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef SHARED
|
||||
/* For libc.so this is defined in wmemset.S.
|
||||
For libc.a, this is a separate source to avoid
|
||||
wmemset bringing in __chk_fail and all routines
|
||||
it calls. */
|
||||
.text
|
||||
ENTRY (__wmemset_chk)
|
||||
cmpq %rdx, %rcx
|
||||
jb __chk_fail
|
||||
jmp wmemset
|
||||
END (__wmemset_chk)
|
||||
/* If we don't have real infinity, then we're supposed to produce a float
|
||||
value that overflows at translation time, which is required to produce
|
||||
a diagnostic. GCC's __builtin_inff produces a quite nice diagnostic
|
||||
that tells the user that the target doesn't support infinities. */
|
||||
|
||||
#if __GNUC_PREREQ(3,3)
|
||||
# define INFINITY (__builtin_inff())
|
||||
#else
|
||||
# define INFINITY (1e9999f)
|
||||
#endif
|
||||
@@ -59,12 +59,3 @@
|
||||
#else
|
||||
# define __GLIBC_USE_IEC_60559_FUNCS_EXT 0
|
||||
#endif
|
||||
|
||||
/* ISO/IEC TS 18661-3:2015 defines the
|
||||
__STDC_WANT_IEC_60559_TYPES_EXT__ macro. */
|
||||
#undef __GLIBC_USE_IEC_60559_TYPES_EXT
|
||||
#if defined __USE_GNU || defined __STDC_WANT_IEC_60559_TYPES_EXT__
|
||||
# define __GLIBC_USE_IEC_60559_TYPES_EXT 1
|
||||
#else
|
||||
# define __GLIBC_USE_IEC_60559_TYPES_EXT 0
|
||||
#endif
|
||||
|
||||
@@ -36,30 +36,24 @@
|
||||
#define __DECL_SIMD_cos
|
||||
#define __DECL_SIMD_cosf
|
||||
#define __DECL_SIMD_cosl
|
||||
#define __DECL_SIMD_cosf128
|
||||
|
||||
#define __DECL_SIMD_sin
|
||||
#define __DECL_SIMD_sinf
|
||||
#define __DECL_SIMD_sinl
|
||||
#define __DECL_SIMD_sinf128
|
||||
|
||||
#define __DECL_SIMD_sincos
|
||||
#define __DECL_SIMD_sincosf
|
||||
#define __DECL_SIMD_sincosl
|
||||
#define __DECL_SIMD_sincosf128
|
||||
|
||||
#define __DECL_SIMD_log
|
||||
#define __DECL_SIMD_logf
|
||||
#define __DECL_SIMD_logl
|
||||
#define __DECL_SIMD_logf128
|
||||
|
||||
#define __DECL_SIMD_exp
|
||||
#define __DECL_SIMD_expf
|
||||
#define __DECL_SIMD_expl
|
||||
#define __DECL_SIMD_expf128
|
||||
|
||||
#define __DECL_SIMD_pow
|
||||
#define __DECL_SIMD_powf
|
||||
#define __DECL_SIMD_powl
|
||||
#define __DECL_SIMD_powf128
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
#ifndef _MATH_H
|
||||
#error "Never use <bits/nan.h> directly; include <math.h> instead."
|
||||
#endif
|
||||
|
||||
/* This file should define `NAN' on machines that have such things. */
|
||||
+43
-1
@@ -130,7 +130,49 @@ enum __rusage_who
|
||||
};
|
||||
|
||||
#include <bits/types/struct_timeval.h>
|
||||
#include <bits/types/struct_rusage.h>
|
||||
|
||||
/* Structure which says how much of each resource has been used. */
|
||||
struct rusage
|
||||
{
|
||||
/* Total amount of user time used. */
|
||||
struct timeval ru_utime;
|
||||
/* Total amount of system time used. */
|
||||
struct timeval ru_stime;
|
||||
/* Maximum resident set size (in kilobytes). */
|
||||
long int ru_maxrss;
|
||||
/* Amount of sharing of text segment memory
|
||||
with other processes (kilobyte-seconds). */
|
||||
long int ru_ixrss;
|
||||
/* Amount of data segment memory used (kilobyte-seconds). */
|
||||
long int ru_idrss;
|
||||
/* Amount of stack memory used (kilobyte-seconds). */
|
||||
long int ru_isrss;
|
||||
/* Number of soft page faults (i.e. those serviced by reclaiming
|
||||
a page from the list of pages awaiting reallocation. */
|
||||
long int ru_minflt;
|
||||
/* Number of hard page faults (i.e. those that required I/O). */
|
||||
long int ru_majflt;
|
||||
/* Number of times a process was swapped out of physical memory. */
|
||||
long int ru_nswap;
|
||||
/* Number of input operations via the file system. Note: This
|
||||
and `ru_oublock' do not include operations with the cache. */
|
||||
long int ru_inblock;
|
||||
/* Number of output operations via the file system. */
|
||||
long int ru_oublock;
|
||||
/* Number of IPC messages sent. */
|
||||
long int ru_msgsnd;
|
||||
/* Number of IPC messages received. */
|
||||
long int ru_msgrcv;
|
||||
/* Number of signals delivered. */
|
||||
long int ru_nsignals;
|
||||
/* Number of voluntary context switches, i.e. because the process
|
||||
gave up the process before it had to (usually to wait for some
|
||||
resource to be available). */
|
||||
long int ru_nvcsw;
|
||||
/* Number of involuntary context switches, i.e. a higher priority process
|
||||
became runnable or the current process used up its time slice. */
|
||||
long int ru_nivcsw;
|
||||
};
|
||||
|
||||
/* Priority limits. */
|
||||
#define PRIO_MIN -20 /* Minimum priority a process can have. */
|
||||
|
||||
+117
-4
@@ -17,13 +17,13 @@
|
||||
License along with the GNU C Library; if not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _BITS_SCHED_H
|
||||
#define _BITS_SCHED_H 1
|
||||
#ifndef __need_schedparam
|
||||
|
||||
#ifndef _SCHED_H
|
||||
# error "Never include <bits/sched.h> directly; use <sched.h> instead."
|
||||
#endif
|
||||
|
||||
|
||||
/* Scheduling algorithms. */
|
||||
#define SCHED_OTHER 0
|
||||
#define SCHED_FIFO 1
|
||||
@@ -32,7 +32,120 @@
|
||||
/* Data structure to describe a process' schedulability. */
|
||||
struct sched_param
|
||||
{
|
||||
int sched_priority;
|
||||
int __sched_priority;
|
||||
};
|
||||
|
||||
#endif /* bits/sched.h */
|
||||
#endif /* need schedparam */
|
||||
|
||||
#if !defined __defined_schedparam \
|
||||
&& (defined __need_schedparam || defined _SCHED_H)
|
||||
# define __defined_schedparam 1
|
||||
/* Data structure to describe a process' schedulability. */
|
||||
struct __sched_param
|
||||
{
|
||||
int __sched_priority;
|
||||
};
|
||||
# undef __need_schedparam
|
||||
#endif
|
||||
|
||||
|
||||
#if defined _SCHED_H && !defined __cpu_set_t_defined
|
||||
# define __cpu_set_t_defined
|
||||
/* Size definition for CPU sets. */
|
||||
# define __CPU_SETSIZE 1024
|
||||
# define __NCPUBITS (8 * sizeof (__cpu_mask))
|
||||
|
||||
/* Type for array elements in 'cpu_set_t'. */
|
||||
typedef unsigned long int __cpu_mask;
|
||||
|
||||
/* Basic access functions. */
|
||||
# define __CPUELT(cpu) ((cpu) / __NCPUBITS)
|
||||
# define __CPUMASK(cpu) ((__cpu_mask) 1 << ((cpu) % __NCPUBITS))
|
||||
|
||||
/* Data structure to describe CPU mask. */
|
||||
typedef struct
|
||||
{
|
||||
__cpu_mask __bits[__CPU_SETSIZE / __NCPUBITS];
|
||||
} cpu_set_t;
|
||||
|
||||
/* Access functions for CPU masks. */
|
||||
# if __GNUC_PREREQ (2, 91)
|
||||
# define __CPU_ZERO_S(setsize, cpusetp) \
|
||||
do __builtin_memset (cpusetp, '\0', setsize); while (0)
|
||||
# else
|
||||
# define __CPU_ZERO_S(setsize, cpusetp) \
|
||||
do { \
|
||||
size_t __i; \
|
||||
size_t __imax = (setsize) / sizeof (__cpu_mask); \
|
||||
__cpu_mask *__bits = (cpusetp)->__bits; \
|
||||
for (__i = 0; __i < __imax; ++__i) \
|
||||
__bits[__i] = 0; \
|
||||
} while (0)
|
||||
# endif
|
||||
# define __CPU_SET_S(cpu, setsize, cpusetp) \
|
||||
(__extension__ \
|
||||
({ size_t __cpu = (cpu); \
|
||||
__cpu < 8 * (setsize) \
|
||||
? (((__cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)] \
|
||||
|= __CPUMASK (__cpu)) \
|
||||
: 0; }))
|
||||
# define __CPU_CLR_S(cpu, setsize, cpusetp) \
|
||||
(__extension__ \
|
||||
({ size_t __cpu = (cpu); \
|
||||
__cpu < 8 * (setsize) \
|
||||
? (((__cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)] \
|
||||
&= ~__CPUMASK (__cpu)) \
|
||||
: 0; }))
|
||||
# define __CPU_ISSET_S(cpu, setsize, cpusetp) \
|
||||
(__extension__ \
|
||||
({ size_t __cpu = (cpu); \
|
||||
__cpu < 8 * (setsize) \
|
||||
? ((((const __cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)] \
|
||||
& __CPUMASK (__cpu))) != 0 \
|
||||
: 0; }))
|
||||
|
||||
# define __CPU_COUNT_S(setsize, cpusetp) \
|
||||
__sched_cpucount (setsize, cpusetp)
|
||||
|
||||
# if __GNUC_PREREQ (2, 91)
|
||||
# define __CPU_EQUAL_S(setsize, cpusetp1, cpusetp2) \
|
||||
(__builtin_memcmp (cpusetp1, cpusetp2, setsize) == 0)
|
||||
# else
|
||||
# define __CPU_EQUAL_S(setsize, cpusetp1, cpusetp2) \
|
||||
(__extension__ \
|
||||
({ const __cpu_mask *__arr1 = (cpusetp1)->__bits; \
|
||||
const __cpu_mask *__arr2 = (cpusetp2)->__bits; \
|
||||
size_t __imax = (setsize) / sizeof (__cpu_mask); \
|
||||
size_t __i; \
|
||||
for (__i = 0; __i < __imax; ++__i) \
|
||||
if (__arr1[__i] != __arr2[__i]) \
|
||||
break; \
|
||||
__i == __imax; }))
|
||||
# endif
|
||||
|
||||
# define __CPU_OP_S(setsize, destset, srcset1, srcset2, op) \
|
||||
(__extension__ \
|
||||
({ cpu_set_t *__dest = (destset); \
|
||||
const __cpu_mask *__arr1 = (srcset1)->__bits; \
|
||||
const __cpu_mask *__arr2 = (srcset2)->__bits; \
|
||||
size_t __imax = (setsize) / sizeof (__cpu_mask); \
|
||||
size_t __i; \
|
||||
for (__i = 0; __i < __imax; ++__i) \
|
||||
((__cpu_mask *) __dest->__bits)[__i] = __arr1[__i] op __arr2[__i]; \
|
||||
__dest; }))
|
||||
|
||||
# define __CPU_ALLOC_SIZE(count) \
|
||||
((((count) + __NCPUBITS - 1) / __NCPUBITS) * sizeof (__cpu_mask))
|
||||
# define __CPU_ALLOC(count) __sched_cpualloc (count)
|
||||
# define __CPU_FREE(cpuset) __sched_cpufree (cpuset)
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
extern int __sched_cpucount (size_t __setsize, const cpu_set_t *__setp)
|
||||
__THROW;
|
||||
extern cpu_set_t *__sched_cpualloc (size_t __count) __THROW __wur;
|
||||
extern void __sched_cpufree (cpu_set_t *__set) __THROW;
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif
|
||||
|
||||
+3
-3
@@ -29,7 +29,7 @@
|
||||
struct sigaction
|
||||
{
|
||||
/* Signal handler. */
|
||||
#if defined __USE_POSIX199309 || defined __USE_XOPEN_EXTENDED
|
||||
#ifdef __USE_POSIX199309
|
||||
union
|
||||
{
|
||||
/* Used if SA_SIGINFO is not set. */
|
||||
@@ -52,10 +52,10 @@ struct sigaction
|
||||
};
|
||||
|
||||
/* Bits in `sa_flags'. */
|
||||
#if defined __USE_XOPEN_EXTENDED || defined __USE_MISC
|
||||
#if defined __USE_UNIX98 || defined __USE_MISC
|
||||
# define SA_ONSTACK 0x0001 /* Take signal on signal stack. */
|
||||
#endif
|
||||
#if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8
|
||||
#if defined __USE_UNIX98 || defined __USE_XOPEN2K8
|
||||
# define SA_RESTART 0x0002 /* Restart syscall on signal return. */
|
||||
# define SA_NODEFER 0x0010 /* Don't automatically block the signal when
|
||||
its handler is being executed. */
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
/* sigevent constants. Stub version.
|
||||
Copyright (C) 1997-2017 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _BITS_SIGEVENT_CONSTS_H
|
||||
#define _BITS_SIGEVENT_CONSTS_H 1
|
||||
|
||||
#if !defined _SIGNAL_H && !defined _AIO_H
|
||||
#error "Don't include <bits/sigevent-consts.h> directly; use <signal.h> instead."
|
||||
#endif
|
||||
|
||||
/* `sigev_notify' values. */
|
||||
enum
|
||||
{
|
||||
SIGEV_SIGNAL = 0, /* Notify via signal. */
|
||||
# define SIGEV_SIGNAL SIGEV_SIGNAL
|
||||
SIGEV_NONE, /* Other notification: meaningless. */
|
||||
# define SIGEV_NONE SIGEV_NONE
|
||||
SIGEV_THREAD /* Deliver via thread creation. */
|
||||
# define SIGEV_THREAD SIGEV_THREAD
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,4 +1,4 @@
|
||||
/* siginfo_t constants. Stub version.
|
||||
/* siginfo_t, sigevent and constants. Stub version.
|
||||
Copyright (C) 1997-2017 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
@@ -16,8 +16,42 @@
|
||||
License along with the GNU C Library; if not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _BITS_SIGINFO_CONSTS_H
|
||||
#define _BITS_SIGINFO_CONSTS_H 1
|
||||
#if !defined _SIGNAL_H && !defined __need_siginfo_t \
|
||||
&& !defined __need_sigevent_t
|
||||
# error "Never include this file directly. Use <signal.h> instead"
|
||||
#endif
|
||||
|
||||
#if (!defined __have_sigval_t \
|
||||
&& (defined _SIGNAL_H || defined __need_siginfo_t \
|
||||
|| defined __need_sigevent_t))
|
||||
# define __have_sigval_t 1
|
||||
|
||||
/* Type for data associated with a signal. */
|
||||
typedef union sigval
|
||||
{
|
||||
int sival_int;
|
||||
void *sival_ptr;
|
||||
} sigval_t;
|
||||
#endif
|
||||
|
||||
#if (!defined __have_siginfo_t \
|
||||
&& (defined _SIGNAL_H || defined __need_siginfo_t))
|
||||
# define __have_siginfo_t 1
|
||||
|
||||
typedef struct siginfo
|
||||
{
|
||||
int si_signo; /* Signal number. */
|
||||
int si_errno; /* If non-zero, an errno value associated with
|
||||
this signal, as defined in <errno.h>. */
|
||||
int si_code; /* Signal code. */
|
||||
__pid_t si_pid; /* Sending process ID. */
|
||||
__uid_t si_uid; /* Real user ID of sending process. */
|
||||
void *si_addr; /* Address of faulting instruction. */
|
||||
int si_status; /* Exit value or signal. */
|
||||
long int si_band; /* Band event for SIGPOLL. */
|
||||
union sigval si_value; /* Signal value. */
|
||||
} siginfo_t;
|
||||
|
||||
|
||||
/* Values for `si_code'. Positive values are reserved for kernel-generated
|
||||
signals. */
|
||||
@@ -147,4 +181,36 @@ enum
|
||||
};
|
||||
# endif
|
||||
|
||||
#endif
|
||||
# undef __need_siginfo_t
|
||||
#endif /* !have siginfo_t && (have _SIGNAL_H || need siginfo_t). */
|
||||
|
||||
|
||||
#if (defined _SIGNAL_H || defined __need_sigevent_t) \
|
||||
&& !defined __have_sigevent_t
|
||||
# define __have_sigevent_t 1
|
||||
|
||||
/* Structure to transport application-defined values with signals. */
|
||||
# define SIGEV_MAX_SIZE 64
|
||||
# define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE / sizeof (int)) - 3)
|
||||
|
||||
typedef struct sigevent
|
||||
{
|
||||
sigval_t sigev_value;
|
||||
int sigev_signo;
|
||||
int sigev_notify;
|
||||
void (*sigev_notify_function) (sigval_t); /* Function to start. */
|
||||
void *sigev_notify_attributes; /* Really pthread_attr_t.*/
|
||||
} sigevent_t;
|
||||
|
||||
/* `sigev_notify' values. */
|
||||
enum
|
||||
{
|
||||
SIGEV_SIGNAL = 0, /* Notify via signal. */
|
||||
# define SIGEV_SIGNAL SIGEV_SIGNAL
|
||||
SIGEV_NONE, /* Other notification: meaningless. */
|
||||
# define SIGEV_NONE SIGEV_NONE
|
||||
SIGEV_THREAD /* Deliver via thread creation. */
|
||||
# define SIGEV_THREAD SIGEV_THREAD
|
||||
};
|
||||
|
||||
#endif /* have _SIGNAL_H. */
|
||||
@@ -1,102 +0,0 @@
|
||||
/* Signal number constants. Generic template.
|
||||
Copyright (C) 1991-2017 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _BITS_SIGNUM_GENERIC_H
|
||||
#define _BITS_SIGNUM_GENERIC_H 1
|
||||
|
||||
#ifndef _SIGNAL_H
|
||||
#error "Never include <bits/signum-generic.h> directly; use <signal.h> instead."
|
||||
#endif
|
||||
|
||||
/* Fake signal functions. */
|
||||
|
||||
#define SIG_ERR ((__sighandler_t) -1) /* Error return. */
|
||||
#define SIG_DFL ((__sighandler_t) 0) /* Default action. */
|
||||
#define SIG_IGN ((__sighandler_t) 1) /* Ignore signal. */
|
||||
|
||||
#ifdef __USE_XOPEN
|
||||
# define SIG_HOLD ((__sighandler_t) 2) /* Add signal to hold mask. */
|
||||
#endif
|
||||
|
||||
/* We define here all the signal names listed in POSIX (1003.1-2008);
|
||||
as of 1003.1-2013, no additional signals have been added by POSIX.
|
||||
We also define here signal names that historically exist in every
|
||||
real-world POSIX variant (e.g. SIGWINCH).
|
||||
|
||||
Signals in the 1-15 range are defined with their historical numbers.
|
||||
For other signals, we use the BSD numbers.
|
||||
There are two unallocated signal numbers in the 1-31 range: 7 and 29.
|
||||
Signal number 0 is reserved for use as kill(pid, 0), to test whether
|
||||
a process exists without sending it a signal. */
|
||||
|
||||
/* ISO C99 signals. */
|
||||
#define SIGINT 2 /* Interactive attention signal. */
|
||||
#define SIGILL 4 /* Illegal instruction. */
|
||||
#define SIGABRT 6 /* Abnormal termination. */
|
||||
#define SIGFPE 8 /* Erroneous arithmetic operation. */
|
||||
#define SIGSEGV 11 /* Invalid access to storage. */
|
||||
#define SIGTERM 15 /* Termination request. */
|
||||
|
||||
/* Historical signals specified by POSIX. */
|
||||
#define SIGHUP 1 /* Hangup. */
|
||||
#define SIGQUIT 3 /* Quit. */
|
||||
#define SIGTRAP 5 /* Trace/breakpoint trap. */
|
||||
#define SIGKILL 9 /* Killed. */
|
||||
#define SIGBUS 10 /* Bus error. */
|
||||
#define SIGSYS 12 /* Bad system call. */
|
||||
#define SIGPIPE 13 /* Broken pipe. */
|
||||
#define SIGALRM 14 /* Alarm clock. */
|
||||
|
||||
/* New(er) POSIX signals (1003.1-2008, 1003.1-2013). */
|
||||
#define SIGURG 16 /* Urgent data is available at a socket. */
|
||||
#define SIGSTOP 17 /* Stop, unblockable. */
|
||||
#define SIGTSTP 18 /* Keyboard stop. */
|
||||
#define SIGCONT 19 /* Continue. */
|
||||
#define SIGCHLD 20 /* Child terminated or stopped. */
|
||||
#define SIGTTIN 21 /* Background read from control terminal. */
|
||||
#define SIGTTOU 22 /* Background write to control terminal. */
|
||||
#define SIGPOLL 23 /* Pollable event occurred (System V). */
|
||||
#define SIGXCPU 24 /* CPU time limit exceeded. */
|
||||
#define SIGXFSZ 25 /* File size limit exceeded. */
|
||||
#define SIGVTALRM 26 /* Virtual timer expired. */
|
||||
#define SIGPROF 27 /* Profiling timer expired. */
|
||||
#define SIGUSR1 30 /* User-defined signal 1. */
|
||||
#define SIGUSR2 31 /* User-defined signal 2. */
|
||||
|
||||
/* Nonstandard signals found in all modern POSIX systems
|
||||
(including both BSD and Linux). */
|
||||
#define SIGWINCH 28 /* Window size change (4.3 BSD, Sun). */
|
||||
|
||||
/* Archaic names for compatibility. */
|
||||
#define SIGIO SIGPOLL /* I/O now possible (4.2 BSD). */
|
||||
#define SIGIOT SIGABRT /* IOT instruction, abort() on a PDP-11. */
|
||||
#define SIGCLD SIGCHLD /* Old System V name */
|
||||
|
||||
/* Not all systems support real-time signals. bits/signum.h indicates
|
||||
that they are supported by overriding __SIGRTMAX to a value greater
|
||||
than __SIGRTMIN. These constants give the kernel-level hard limits,
|
||||
but some real-time signals may be used internally by glibc. Do not
|
||||
use these constants in application code; use SIGRTMIN and SIGRTMAX
|
||||
(defined in signal.h) instead. */
|
||||
#define __SIGRTMIN 32
|
||||
#define __SIGRTMAX __SIGRTMIN
|
||||
|
||||
/* Biggest signal number + 1 (including real-time signals). */
|
||||
#define _NSIG (__SIGRTMAX + 1)
|
||||
|
||||
#endif /* bits/signum-generic.h. */
|
||||
+62
-10
@@ -1,5 +1,5 @@
|
||||
/* Signal number constants. Generic version.
|
||||
Copyright (C) 2017 Free Software Foundation, Inc.
|
||||
Copyright (C) 1991-2017 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -16,17 +16,69 @@
|
||||
License along with the GNU C Library; if not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _BITS_SIGNUM_H
|
||||
#define _BITS_SIGNUM_H 1
|
||||
#ifdef _SIGNAL_H
|
||||
|
||||
#ifndef _SIGNAL_H
|
||||
#error "Never include <bits/signum.h> directly; use <signal.h> instead."
|
||||
/* Fake signal functions. */
|
||||
|
||||
#define SIG_ERR ((__sighandler_t) -1) /* Error return. */
|
||||
#define SIG_DFL ((__sighandler_t) 0) /* Default action. */
|
||||
#define SIG_IGN ((__sighandler_t) 1) /* Ignore signal. */
|
||||
|
||||
#ifdef __USE_UNIX98
|
||||
# define SIG_HOLD ((__sighandler_t) 2) /* Add signal to hold mask. */
|
||||
#endif
|
||||
|
||||
#include <bits/signum-generic.h>
|
||||
/* We define here all the signal names listed in POSIX (1003.1-2008);
|
||||
as of 1003.1-2013, no additional signals have been added by POSIX.
|
||||
We also define here signal names that historically exist in every
|
||||
real-world POSIX variant (e.g. SIGWINCH).
|
||||
|
||||
/* This operating system does not need to override any of the generic
|
||||
signal number assignments in bits/signum-generic.h, nor to add any
|
||||
additional signal constants. */
|
||||
Signals in the 1-15 range are defined with their historical numbers.
|
||||
For other signals, we use the BSD numbers. */
|
||||
|
||||
#endif /* bits/signum.h. */
|
||||
/* ISO C99 signals. */
|
||||
#define SIGINT 2 /* Interactive attention signal. */
|
||||
#define SIGILL 4 /* Illegal instruction. */
|
||||
#define SIGABRT 6 /* Abnormal termination. */
|
||||
#define SIGFPE 8 /* Erroneous arithmetic operation. */
|
||||
#define SIGSEGV 11 /* Invalid access to storage. */
|
||||
#define SIGTERM 15 /* Termination request. */
|
||||
|
||||
/* Historical signals specified by POSIX. */
|
||||
#define SIGHUP 1 /* Hangup. */
|
||||
#define SIGQUIT 3 /* Quit. */
|
||||
#define SIGTRAP 5 /* Trace/breakpoint trap. */
|
||||
#define SIGKILL 9 /* Killed. */
|
||||
#define SIGBUS 10 /* Bus error. */
|
||||
#define SIGSYS 12 /* Bad system call. */
|
||||
#define SIGPIPE 13 /* Broken pipe. */
|
||||
#define SIGALRM 14 /* Alarm clock. */
|
||||
|
||||
/* New(er) POSIX signals (1003.1-2008, 1003.1-2013). */
|
||||
#define SIGURG 16 /* High bandwidth data is available at a socket. */
|
||||
#define SIGSTOP 17 /* Stopped (signal). */
|
||||
#define SIGTSTP 18 /* Stopped. */
|
||||
#define SIGCONT 19 /* Continued. */
|
||||
#define SIGCHLD 20 /* Child terminated or stopped. */
|
||||
#define SIGTTIN 21 /* Background read from control terminal. */
|
||||
#define SIGTTOU 22 /* Background write to control terminal. */
|
||||
#define SIGPOLL 23 /* Pollable event occurred (System V). */
|
||||
#define SIGIO SIGPOLL /* I/O now possible (4.2 BSD). */
|
||||
#define SIGXCPU 24 /* CPU time limit exceeded. */
|
||||
#define SIGXFSZ 25 /* File size limit exceeded. */
|
||||
#define SIGVTALRM 26 /* Virtual timer expired. */
|
||||
#define SIGPROF 27 /* Profiling timer expired. */
|
||||
#define SIGUSR1 30 /* User-defined signal 1. */
|
||||
#define SIGUSR2 31 /* User-defined signal 2. */
|
||||
|
||||
/* Nonstandard signals found in all modern POSIX systems
|
||||
(including both BSD and Linux). */
|
||||
#define SIGWINCH 28 /* Window size change (4.3 BSD, Sun). */
|
||||
|
||||
#define _NSIG 32
|
||||
|
||||
/* Archaic names for compatibility. */
|
||||
#define SIGIOT SIGABRT /* IOT instruction, abort() on a PDP-11. */
|
||||
#define SIGCLD SIGCHLD /* Old System V name */
|
||||
|
||||
#endif /* <signal.h> included. */
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
/* __sig_atomic_t, __sigset_t, and related definitions. Generic/BSD version.
|
||||
Copyright (C) 1991-2017 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _SIGSET_H_types
|
||||
#define _SIGSET_H_types 1
|
||||
|
||||
typedef int __sig_atomic_t;
|
||||
|
||||
/* A `sigset_t' has a bit for each signal. */
|
||||
typedef unsigned long int __sigset_t;
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/* We only want to define these functions if <signal.h> was actually
|
||||
included; otherwise we were included just to define the types. Since we
|
||||
are namespace-clean, it wouldn't hurt to define extra macros. But
|
||||
trouble can be caused by functions being defined (e.g., any global
|
||||
register vars declared later will cause compilation errors). */
|
||||
|
||||
#if !defined _SIGSET_H_fns && defined _SIGNAL_H
|
||||
#define _SIGSET_H_fns 1
|
||||
|
||||
#ifndef _EXTERN_INLINE
|
||||
# define _EXTERN_INLINE __extern_inline
|
||||
#endif
|
||||
|
||||
/* Return a mask that includes SIG only. The cast to `sigset_t' avoids
|
||||
overflow if `sigset_t' is wider than `int'. */
|
||||
#define __sigmask(sig) (((__sigset_t) 1) << ((sig) - 1))
|
||||
|
||||
#define __sigemptyset(set) \
|
||||
(__extension__ ({ *(set) = (__sigset_t) 0; 0; })
|
||||
#define __sigfillset(set) \
|
||||
(__extension__ ({ *(set) = ~(__sigset_t) 0; 0; }))
|
||||
|
||||
#ifdef _GNU_SOURCE
|
||||
# define __sigisemptyset(set) (*(set) == (__sigset_t) 0)
|
||||
# define __sigandset(dest, left, right) \
|
||||
(__extension__ ({ *(dest) = *(left) & *(right); 0; }))
|
||||
# define __sigorset(dest, left, right) \
|
||||
(__extension__ ({ *(dest) = *(left) | *(right); 0; }))
|
||||
#endif
|
||||
|
||||
/* These functions needn't check for a bogus signal number -- error
|
||||
checking is done in the non __ versions. */
|
||||
|
||||
extern int __sigismember (const __sigset_t *, int);
|
||||
extern int __sigaddset (__sigset_t *, int);
|
||||
extern int __sigdelset (__sigset_t *, int);
|
||||
|
||||
#ifdef __USE_EXTERN_INLINES
|
||||
# define __SIGSETFN(NAME, BODY, CONST) \
|
||||
_EXTERN_INLINE int \
|
||||
NAME (CONST __sigset_t *__set, int __sig) \
|
||||
{ \
|
||||
__sigset_t __mask = __sigmask (__sig); \
|
||||
return BODY; \
|
||||
}
|
||||
|
||||
__SIGSETFN (__sigismember, (*__set & __mask) ? 1 : 0, const)
|
||||
__SIGSETFN (__sigaddset, ((*__set |= __mask), 0), )
|
||||
__SIGSETFN (__sigdelset, ((*__set &= ~__mask), 0), )
|
||||
|
||||
# undef __SIGSETFN
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* ! _SIGSET_H_fns. */
|
||||
@@ -23,6 +23,33 @@
|
||||
# error "Never include this file directly. Use <signal.h> instead"
|
||||
#endif
|
||||
|
||||
|
||||
/* Structure describing a signal stack (obsolete). */
|
||||
struct sigstack
|
||||
{
|
||||
__ptr_t ss_sp; /* Signal stack pointer. */
|
||||
int ss_onstack; /* Nonzero if executing on this stack. */
|
||||
};
|
||||
|
||||
|
||||
/* Alternate, preferred interface. */
|
||||
typedef struct sigaltstack
|
||||
{
|
||||
__ptr_t ss_sp;
|
||||
size_t ss_size;
|
||||
int ss_flags;
|
||||
} stack_t;
|
||||
|
||||
|
||||
/* Possible values for `ss_flags.'. */
|
||||
enum
|
||||
{
|
||||
SS_ONSTACK = 0x0001,
|
||||
#define SS_ONSTACK SS_ONSTACK
|
||||
SS_DISABLE = 0x0004
|
||||
#define SS_DISABLE SS_DISABLE
|
||||
};
|
||||
|
||||
/* Minumum stack size for a signal handler. */
|
||||
#define MINSIGSTKSZ 8192
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user