4 * Copyright 1995 Morten Welinder
12 int runtime_cpu (void)
19 FILE *f = fopen ("/proc/cpuinfo", "r");
21 cache = 3; /* Default. */
25 char info[5], value[5];
26 while (fscanf (f, " %4s%*s : %4s%*s", info, value) == 2)
27 if (!lstrcmpi32A(info, "cpu"))
29 if (isdigit (value[0]) && value[1] == '8'
30 && value[2] == '6' && value[3] == 0)
32 cache = value[0] - '0';
41 /* FIXME: how do we do this on other systems? */