newlib-cygwin/newlib/libc
Corinna Vinschen 38fd7ddb79 Allow sysconf to return CPU cache information
* include/sys/unistd.h (_SC_LEVEL*): Add cache-related variables as
        on Linux.

        * fhandler_proc.cc (format_proc_cpuinfo): Fetch cache information
        from new cache functions in sysconf.cc, get_cpu_cache_intel and
        get_cpu_cache_amd.
        * sysconf.cc (__nt_query_system): New local helper.
        (get_nproc_values): Utilize __nt_query_system on pre-Windows 7 systems.
        Use GetLogicalProcessorInformationEx otherwise to handle more than
        64 CPUs.  Only handle _SC_NPROCESSORS_CONF and _SC_NPROCESSORS_ONLN.
        (get_phys_pages): New helper to handle _SC_PHYS_PAGES.
        (cpuid2_cache_descriptor): New array to map Intel CPUID 2 descriptor
        values to cache type, cache size, associativity and linesize.
        (cpuid2_cache_desc_compar): Comparision function for bsearch over
        cpuid2_cache_descriptor.
        (get_cpu_cache_intel_cpuid2): New function to fetch cache info from
        Intel CPUID 2.
        (get_cpu_cache_intel_cpuid4): Ditto from Intel CPUID 4.
        (get_cpu_cache_intel): New function as CPU-specific entry point.
        (assoc): New array to map associativity values from AMD CPUID
        0x80000006.
        (get_cpu_cache_amd): New function to fetch cache info from AMD CPUIDs
        0x80000005 and 0x80000006.
        (get_cpu_cache): New function to fetch cache info.
        (sca): Call get_phys_pages if _SC_PHYS_PAGES is requested.  Call
        get_cpu_cache for new _SC_* cache requests.
        (SC_MAX): Set to _SC_LEVEL4_CACHE_LINESIZE.
        (get_phys_pages(void)): Call get_phys_pages(int).
        * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.

        * new-features.xml (ov-new2.3): Document sysconf cache addition.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2015-08-29 09:16:47 +02:00
..
argz Correct argz_replace behaviour when memory is exhausted. 2015-06-01 10:09:04 +02:00
ctype Regenerate Makefile.in 2015-06-29 12:29:50 +01:00
errno 2012-12-20 Jeff Johnston <jjohnstn@redhat.com> 2012-12-20 21:10:27 +00:00
iconv Remove a stray sentence fragment in iconv.tex 2015-07-24 15:50:09 +01:00
include Allow sysconf to return CPU cache information 2015-08-29 09:16:47 +02:00
locale Fix mismatched parentheses in documentation. 2015-06-24 12:23:25 +01:00
machine strlen-armv7.S: Fix preprocessor check 2015-08-27 12:55:22 +02:00
misc 2012-12-20 Jeff Johnston <jjohnstn@redhat.com> 2012-12-20 21:10:27 +00:00
posix Regenerate Makefile.in 2015-06-29 12:29:50 +01:00
reent Add missing NEWPAGE commands to makedoc markup in reent/ 2015-07-24 15:50:00 +01:00
search * libc/include/stdlib.h (__bsd_qsort_r): Declare. 2014-12-05 16:21:04 +00:00
signal Fix makedoc markup used in texinfo source 2015-06-23 16:14:39 +01:00
stdio Fix wscanf family positional parameter handling in %lc, %ls, %l[] 2015-08-03 21:51:35 +02:00
stdio64 Regenerate Makefile.in 2015-06-29 12:29:50 +01:00
stdlib Regenerate Makefile.in 2015-06-29 12:29:50 +01:00
string Regenerate Makefile.in 2015-06-29 12:29:50 +01:00
sys Add MIN MAX macro to param header file. 2015-08-20 10:52:34 +02:00
syscalls 2012-12-20 Jeff Johnston <jjohnstn@redhat.com> 2012-12-20 21:10:27 +00:00
time Fix SYNOPSIS prototypes without marked up parameter names 2015-06-23 17:30:22 +01:00
unix * libc/unix/getcwd.c (getcwd): Close directory also in case of an error. 2014-10-16 15:00:59 +00:00
xdr 2012-12-20 Jeff Johnston <jjohnstn@redhat.com> 2012-12-20 21:10:27 +00:00
Makefile.am 2011-01-05 Ralf Corsepius <ralf.corsepius@rtems.org> 2011-01-05 17:18:16 +00:00
Makefile.in 2012-12-20 Jeff Johnston <jjohnstn@redhat.com> 2012-12-20 21:10:27 +00:00
aclocal.m4 2012-12-20 Jeff Johnston <jjohnstn@redhat.com> 2012-12-20 21:10:27 +00:00
configure 2014-12-18 Jeff Johnston <jjohnstn@redhat.com> 2014-12-18 20:30:11 +00:00
configure.in 2014-07-04 Bin Cheng <bin.cheng@arm.com> 2014-07-04 17:21:45 +00:00
libc.texinfo Fix newlib texinfo source so 'info libc' and 'info libm' work 2015-03-16 15:02:22 +00:00
saber
sys.tex Don't include stdio64 functions in reentrant syscalls menu when not bulding stdio64. 2015-08-03 09:54:33 +01:00