On Sun, Jan 29, 2012 at 07:56:05PM +0100, Rudolf Marek wrote:
Hi,
Sure why not. The idea behind the variable use was not to perform the test everytime as you suggested on the IRC channel. But I like this variant too, lets give it a go.
Yeah - sorry about that - the fact that cpuid is needed so early makes it painful to cache the results. Also, cpuid isn't really called frequently, so I don't think there's much harm in doing explicit detection. Now that I think about it, though, it's probably better to keep the name cpuid() and rename the low-level cpuid to __cpuid().
-Kevin