about summary refs log tree commit diff
path: root/sysdeps/posix
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-03-12 17:40:52 +0000
committerUlrich Drepper <drepper@redhat.com>2004-03-12 17:40:52 +0000
commitbf067910f598d44f4cf37474a2654258ec03d773 (patch)
treeea2d4d79a91ee64b90588c456211d159834d5c34 /sysdeps/posix
parent7780fd933c674642ce4c607b9c386a72d7653dfe (diff)
downloadglibc-bf067910f598d44f4cf37474a2654258ec03d773.tar.gz
glibc-bf067910f598d44f4cf37474a2654258ec03d773.tar.xz
glibc-bf067910f598d44f4cf37474a2654258ec03d773.zip
Update.
2004-03-12  Ulrich Drepper  <drepper@redhat.com>

	* 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.
Diffstat (limited to 'sysdeps/posix')
-rw-r--r--sysdeps/posix/sysconf.c19
1 files changed, 19 insertions, 0 deletions
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;
     }
 }