4 * Copyright 1995 Morten Welinder
11 int runtime_cpu (void)
18 FILE *f
= fopen ("/proc/cpuinfo", "r");
20 cache
= 3; /* Default. */
24 char info
[5], value
[5];
25 while (fscanf (f
, " %4s%*s : %4s%*s", info
, value
) == 2)
26 if (!strcasecmp (info
, "cpu"))
28 if (isdigit (value
[0]) && value
[1] == '8'
29 && value
[2] == '6' && value
[3] == 0)
31 cache
= value
[0] - '0';
40 /* FIXME: how do we do this on other systems? */