newlib-cygwin/winsup
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
..
cygserver * pwdgrp.cc: Handle default fetch_user_arg_type_t in switches 2015-02-23 21:00:31 +00:00
cygwin Allow sysconf to return CPU cache information 2015-08-29 09:16:47 +02:00
doc Allow sysconf to return CPU cache information 2015-08-29 09:16:47 +02:00
lsaauth * configure.ac: Convert to new AC_INIT style. 2014-08-15 21:24:35 +00:00
testsuite * configure.ac: Convert to new AC_INIT style. 2014-08-15 21:24:35 +00:00
utils strace: Handle ofile descriptor more carefully. 2015-08-03 12:02:17 +02:00
COPYING
CYGWIN_LICENSE
ChangeLog * configure.ac: Convert to new AC_INIT style. 2014-11-13 12:12:56 +00:00
Makefile.common * Makefile.common (COMPILE.cc): Add -fno-use-cxa-atexit. 2014-08-07 16:19:09 +00:00
Makefile.in * Makefile.in: Ignore errors on doc install. 2014-02-18 19:58:39 +00:00
README
acinclude.m4 ChangeLog: 2012-11-23 13:22:47 +00:00
aclocal.m4 winsup/ChangeLog: 2013-11-07 00:19:52 +00:00
autogen.sh ChangeLog: 2012-11-23 13:22:47 +00:00
c++wrap ChangeLog: 2012-11-23 13:22:47 +00:00
ccwrap * ccwrap: Don't drop mingw header file paths unless we've specified them with 2012-11-26 19:00:35 +00:00
config.guess ChangeLog: 2012-11-23 13:22:47 +00:00
config.sub ChangeLog: 2012-11-23 13:22:47 +00:00
configure * configure.ac: Convert to new AC_INIT style. 2014-11-13 12:12:56 +00:00
configure.ac * configure.ac: Convert to new AC_INIT style. 2014-11-13 12:12:56 +00:00
configure.cygwin winsup/ChangeLog: 2013-11-07 00:19:52 +00:00
install-sh ChangeLog: 2012-11-23 13:22:47 +00:00

README

THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.

Cygwin documentation is available on the net at http://cygwin.com
You might especially be interested in

http://cygwin.com/faq/faq.programming.html#faq.programming.building-cygwin