From bf067910f598d44f4cf37474a2654258ec03d773 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 12 Mar 2004 17:40:52 +0000 Subject: Update. 2004-03-12 Ulrich Drepper * posix/getconf.c (vars): Add _SC_ values for cache information. * sysdeps/generic/bits/confname.h: Add _SC_* values for cache information. * sysdeps/unix/sysv/linux/sysconf.c (__sysconf): Reorganize to allow yet another sysconf function to include the one in this file. * sysdeps/unix/sysv/linux/i386/sysconf.c: New file. * sysdeps/generic/sysconf.c: Add default handling for cache line info. --- sysdeps/posix/sysconf.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'sysdeps/posix') diff --git a/sysdeps/posix/sysconf.c b/sysdeps/posix/sysconf.c index 584a44fb41..66f978ba3b 100644 --- a/sysdeps/posix/sysconf.c +++ b/sysdeps/posix/sysconf.c @@ -1164,6 +1164,25 @@ __sysconf (name) #else return -1; #endif + + case _SC_LEVEL1_ICACHE_SIZE: + case _SC_LEVEL1_ICACHE_ASSOC: + case _SC_LEVEL1_ICACHE_LINESIZE: + case _SC_LEVEL1_DCACHE_SIZE: + case _SC_LEVEL1_DCACHE_ASSOC: + case _SC_LEVEL1_DCACHE_LINESIZE: + case _SC_LEVEL2_CACHE_SIZE: + case _SC_LEVEL2_CACHE_ASSOC: + case _SC_LEVEL2_CACHE_LINESIZE: + case _SC_LEVEL3_CACHE_SIZE: + case _SC_LEVEL3_CACHE_ASSOC: + case _SC_LEVEL3_CACHE_LINESIZE: + case _SC_LEVEL4_CACHE_SIZE: + case _SC_LEVEL4_CACHE_ASSOC: + /* In general we cannot determine these values. Therefore we + return zero which indicates that no information is + available. */ + return 0; } } -- cgit v1.2.3-70-g09d2