libc/newlib/libc/include
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
..
machine Cygwin: Implement siglongjmp and sigsetjmp functions. 2015-07-21 17:31:02 +02:00
rpc * libc/include/locale.h (NULL): Fetch definition via stddef.h. 2012-11-01 11:51:12 +00:00
sys Allow sysconf to return CPU cache information 2015-08-29 09:16:47 +02:00
_ansi.h * libc/include/_ansi.h: _LONG_LONG_TYPE definition removed. 2014-10-10 14:43:19 +00:00
_syslist.h 2009-12-17 Jeff Johnston <jjohnstn@redhat.com> 2009-12-17 21:08:04 +00:00
alloca.h
ar.h
argz.h
assert.h * libc/include/assert.h (static_assert): Define. 2012-10-16 19:00:30 +00:00
complex.h * libc/include/complex.h (cabsl): Add prototype. 2015-02-06 16:14:04 +00:00
ctype.h * libc/include/ctype.h (__ctype_lookup): Fix precedence. 2009-11-06 03:27:19 +00:00
dirent.h
envlock.h
envz.h
errno.h
fastmath.h
fcntl.h
fnmatch.h
getopt.h * newlib/libc/include/getopt.h (struct option): name field should be 2013-11-13 09:09:45 +00:00
glob.h 2013-11-21 Julio Gutierrez <jgutleyva@gmail.com> 2013-11-21 17:04:57 +00:00
grp.h * libc/include/pwd.h: Include <sys/cdefs.h>. 2014-02-09 20:02:17 +00:00
iconv.h 2013-11-20 Daniel Ramirez <javamonn@gmail.com> 2013-11-20 13:39:36 +00:00
ieeefp.h * libc/include/complex.h (cabsl): Add prototype. 2015-02-06 16:14:04 +00:00
inttypes.h Fix for pri and scn formats 2015-08-27 12:50:25 +02:00
langinfo.h * libc/include/langinfo.h: Fix #endif positioning. 2010-04-30 14:58:28 +00:00
libgen.h Rework handling of basename variants 2015-07-06 14:58:51 -05:00
limits.h 2013-12-22 JF Bastien <jfb@chromium.org> 2013-12-23 19:21:07 +00:00
locale.h * libc/include/locale.h (NULL): Fetch definition via stddef.h. 2012-11-01 11:51:12 +00:00
malloc.h * libc/include/malloc.h (struct mallinfo): Convert type of all members 2013-02-26 14:25:13 +00:00
math.h * libc/include/complex.h (cabsl): Add prototype. 2015-02-06 16:14:04 +00:00
newlib.h
paths.h 2013-10-10 Sebastian Huber <sebastian.huber@embedded-brains.de> 2013-10-15 17:34:23 +00:00
pthread.h 2013-11-29 Sebastian Huber <sebastian.huber@embedded-brains.de> 2013-11-29 23:35:34 +00:00
pwd.h * libc/include/pwd.h: Include <sys/cdefs.h>. 2014-02-09 20:02:17 +00:00
reent.h Port newlib to x86_64-pc-cygwin. 2013-04-23 09:42:25 +00:00
regdef.h
regex.h 2013-11-20 Chirayu Desai <chirayudesai1@gmail.com> 2013-11-20 16:25:50 +00:00
sched.h 2010-04-01 Joel Sherrill <joel.sherrill@oarcorp.com> 2010-04-01 18:33:37 +00:00
search.h 2013-11-20 Daniel Ramirez <javamonn@gmail.com> 2013-11-20 18:22:27 +00:00
setjmp.h * libc/include/setjmp.h (longjmp): Fix copy/paste error. 2014-01-20 17:23:41 +00:00
signal.h * libc/include/signal.h (psignal): Declare. 2011-05-04 11:26:22 +00:00
spawn.h * libc/include/spawn.h (posix_spawn_file_actions_destroy): Fix typo 2013-11-25 17:23:30 +00:00
stdatomic.h 2013-09-12 Sebastian Huber <sebastian.huber@embedded-brains.de> 2013-09-12 22:05:43 +00:00
stdint.h Improve check for int32_t being long or int 2015-04-29 13:07:17 +02:00
stdio.h * libc/include/stdio.h (FILE): Protect typedef from redefinition. 2015-03-05 17:15:24 +00:00
stdio_ext.h * libc/include/stdio.h (__SNLK): Define. 2014-12-15 18:22:56 +00:00
stdlib.h * libc/include/stdlib.h (__itoa): Declare prototype. 2014-12-16 10:55:17 +00:00
string.h Rework handling of basename variants 2015-07-06 14:58:51 -05:00
strings.h * libc/include/strings.h: Don't include locale.h. 2010-12-08 10:28:40 +00:00
tar.h
termios.h
tgmath.h * libc/include/sys/features.h (__GNUC_PREREQ): Define. Use 2012-10-16 18:45:24 +00:00
time.h Add and use latest <sys/timespec.h> from FreeBSD 2015-03-11 15:45:38 +01:00
unctrl.h
unistd.h
utime.h
utmp.h
wchar.h * libc/include/stdio.h (FILE): Protect typedef from redefinition. 2015-03-05 17:15:24 +00:00
wctype.h
wordexp.h 2013-11-23 Bryan Dunsmore <dunsmoreb@gmail.com> 2013-11-23 22:39:34 +00:00