acadia-newlib/newlib/libc/include/sys
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
..
_default_fcntl.h
_intsup.h Fix for pri and scn formats 2015-08-27 12:50:25 +02:00
_stdint.h Add <sys/_stdint.h> for FreeBSD compatibility 2015-04-23 21:57:10 +02:00
_timespec.h Add and use latest <sys/timespec.h> from FreeBSD 2015-03-11 15:45:38 +01:00
_timeval.h Merge parts of <sys/time.h> from FreeBSD 2015-03-13 13:17:34 +01:00
_types.h
cdefs.h * libc/include/sys/cdefs.h (_GNU_SOURCE): Move check so it has an 2015-02-25 15:58:41 +00:00
config.h Improve check for int32_t being long or int 2015-04-29 13:07:17 +02:00
custom_file.h
dir.h
dirent.h
errno.h
fcntl.h
features.h 2014-12-26 Freddie Chopin <freddie_chopin@op.pl> 2015-01-05 17:31:28 +00:00
file.h
iconvnls.h
lock.h
param.h
queue.h
reent.h
resource.h
sched.h Add and use latest <sys/timespec.h> from FreeBSD 2015-03-11 15:45:38 +01:00
signal.h Always declare "kill" in include/sys/signal.h 2015-08-25 16:17:14 +02:00
stat.h Add and use latest <sys/timespec.h> from FreeBSD 2015-03-11 15:45:38 +01:00
stdio.h
string.h
syslimits.h
time.h Fix sys/time.h build problem due to inconsistent macro usage 2015-07-06 14:08:30 +02:00
timeb.h
times.h
timespec.h Add and use latest <sys/timespec.h> from FreeBSD 2015-03-11 15:45:38 +01:00
tree.h Import <sys/tree.h> from FreeBSD 2015-04-23 21:57:06 +02:00
types.h Fix sys/time.h build problem due to inconsistent macro usage 2015-07-06 14:08:30 +02:00
unistd.h Allow sysconf to return CPU cache information 2015-08-29 09:16:47 +02:00
utime.h
wait.h Fix comment in sys/wait.h 2015-05-28 16:40:43 +02:00